FILEFLEX API REFERENCE



NAME
DBUse -- Open a database file

SYNTAX
DBUse(database-name [, path-spec])

CATEGORY
Managing Database Files

DESCRIPTION
THIS FUNCTION HAS CHANGED IN FILEFLEX 3.0

Data files in FileFlex 3 use FoxPro format. This is different from data files used in FileFlex 2.X (which were in dBASE III format). You'll need to convert any old FileFlex 2.X databases prior to using them in FileFlex 3. FileFlex 3 does not provide a conversion function, but you can easily import dBASE III format and export FoxPro format using either FoxPro or Access.

To open a database file, call the FileFlex function DBUse, supplying a database file name (including full path name if required) as an argument.

Put the result into a variable, because you will need to refer to this file by its returned value (called the "database ID") later.

Be sure not to use the same variable for any two files you to have open at one time.

Alternatively, you can split the path specification into two parameters: the first the actual file name and the second the path specification. In the encrypted runtime (used in FileFlex 2.0 and earlier), the path specification will remain unchanged but the database file name will be decrypted:


EXAMPLE
put DBUse("C:\FILES\Test.DBF") into dbID -- Developer FF 
put DBUse("Test.DBF","HD:DB Files:") into dbID -- Developer FF 
put DBUse("&#R*$*@U","HD:DB Files:") into dbID -- Runtime FF

SEE ALSO
DBUseIndex, DBClose, DBCloseAll

INTERNAL FUNCTION NUMBER
3


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender