Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - use http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 USE
 Open an existing table and its associated files
------------------------------------------------------------------------------

 Syntax

     USE [<xcDatabase>
          [INDEX <xcIndex list>]
          [ALIAS <xcAlias>] [EXCLUSIVE | SHARED]
          [NEW] [READONLY]
          [VIA <cDriver>]
          [PASSWORD <cPassword>]]

     <xcDatabase> is the name of the table to be opened and
     may be specified either as a literal file name or as a character
     expression enclosed in parentheses.

     INDEX <xcIndex list>  specifies the names of 1 to 15 index
     files to be opened in the current work area. Specify each index
     as a literal file name or as a character expression enclosed in
     parentheses. The first index in the list becomes the
     controlling index. If you specify an <xcIndex> as an expression
     and the value returned is spaces or NIL, it is ignored.

     ALIAS <xcAlias>  specifies the name to associate with the work
     area when the table is opened. You may specify the
     alias name as a literal name or as a character expression
     enclosed in parentheses. A valid <xcAlias> may be any legal
     identifier (i.e., it must begin with an alphabetic character
     and may contain numeric or alphabetic characters and the
     underscore). Within a single application, CA-Clipper will not
     accept duplicate aliases. If this clause is omitted, the alias
     defaults to the table name.

     EXCLUSIVE opens the table for nonshared use in a
     network environment. All other users are denied access until
     the table is CLOSEd.

     SHARED opens the table for shared use in a network
     environment. Specifying this clause overrides the current
     EXCLUSIVE setting.

     NEW opens <xcDatabase> in the next available work area making
     it the current work area. If this clause is not specified,
     <xcDatabase> is opened in the current work area.

     READONLY opens <xcDatabase> with a read-only attribute. This
     lets you open tables marked read-only. If you cannot
     open the <xcDatabase> this way, a runtime error is generated.
     If this clause is not specified, <xcDatabase> is opened as
     read-write.

     VIA <cDriver>  specifies the replaceable database driver (RDD)
     with which to process the current work area. <cDriver> is the
     name of the RDD specified as a character expression. If
     <cDriver> is specified as a literal value, it must be enclosed
     in quotes.

     PASSWORD <cPassword>  specifies a password string to be used in
     all subsequent encryption/decryption operations. Only the first 5
     characters in the password string will be used. This value is
     case-sensitive.  For example, a string encrypted with the password
     "BOGUS" would be different than if the password "bogus" were used.

     Note: Make sure to trim all trailing spaces from the password
     before using it with the USE...PASSWORD command, unless the spaces
     are intended to be part of the password.

     If no arguments are specified, the table open in the
     current work area is closed.


 Description

     USE opens an existing table, its associated memo file,
     and optionally associated index file(s) in the current or the
     next available work area. This USE command is identical to the
     CA-Clipper USE command with the exception of the addition of
     the PASSWORD parameter. PASSWORD allows the user to set the
     password to be used for subsequent encryption/decryption
     operations in this work area.

     For more information on the USE command, see your CA-Clipper
     documentation.

 Example

     // Open TEST.DBF and set SECRET as the encryption password for this
     //   work area. Then, encrypt TEST.DBF
     USE test VIA "DBFCDXAX" PASSWORD "SECRET" EXCLUSIVE

     ? "Encrypting TEST.DBF: "
     ?? iif( AX_DBFEncrypt(), "OK", "ERROR" )


See Also: SET PASSWORD AX_SetPassword()

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