Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>use</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USE


Syntax:     USE [<file>/(<expC1>)] [INDEX <file list>/(<expC2>)
            [,(<expC3>)]...] [EXCLUSIVE] [ALIAS <alias>]

Purpose:    To open an existing database file (.dbf), its associated
            memo file (.dbt), and optionally associated index files in
            the current work area.

Argument:   <file> is the name of the database file to open.

Options:    Index: The INDEX <file list> clause specifies the
            name(s) of up to 15 index files to open in the current work
            area.

            Alias: The <alias> is the name to associate with the
            work area when the database file is opened.  If this clause
            is not specified, the alias defaults to the database
            filename.

            Exclusive: The EXCLUSIVE clause opens the database file
            for non-shared use in a network environment.  All other
            users are denied access until the database file is CLOSEd.

Usage:      When a database file is opened, the record pointer is
            positioned at the first logical record in the file (record 1
            if there is no index file specified).

            USE without an argument CLOSEs the active database file,
            associated index, and memo files in the current work area.

Network:    Attempting to USE a database file another user has locked
            with FLOCK() or USEd...EXCLUSIVEly forces NETERR() to true
            (.T.) and generates an open error.  In the default
            Errorsys.prg, Open_error() tests for NETERR() and RETURNs
            true (.T.) if it is a network error.

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   USE Accounts EXCLUSIVE
   IF NETERR()                            && USE not successful.
      ? "Accounts file not available"
   ELSE
      SET INDEX TO Acct_ID
   ENDIF


See Also: SELECT SET INDEX SET EXCLUSIVE NETERR() USED()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson