Click or drag to resize

DbUseAreaFox Function

X#
Open a database file.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax
 FUNCTION DbUseAreaFox(
	uArea,
	cDataFile,
	cAlias,
	lShared,
	lReadOnly,
	lOnline,
	lAdmin,
	lAgain,
	lNoData,
	lNoRequery,
	nDataSession,
	uConnection
) AS LOGIC CLIPPER
Request Example View Source

Parameters

uArea (Optional)
Type: Usual
Specifies the area in which the file must be opened. This represents the value in the IN Clause of the USE command.
cDataFile (Optional)
Type: Usual
The name of the database file to open, including an optional drive, directory, and extension.
If the database file has a corresponding memo file, it is also opened.
The default extension for database and memo files is determined by the RDD.
If the database file or its corresponding memo file does not exist, a runtime error is raised. See SetDefault() and SetPath() for file searching and creation rules.
cAlias (Optional)
Type: Usual
An identifier name to associate with the work area when cDataFile is opened.
If not specified, the alias defaults to the database file name. Duplicate alias names are not allowed within a single application.
lShared (Optional)
Type: Usual
TRUE attempts to open cDataFile for shared use. FALSE attempts to open xcDataFile for exclusive (non-shared) use, denying all other processes access until the database file is closed.If lShared is omitted, the current SetExclusive() setting determines whether shared access is allowed. However, it is highly recommended that you specify the open mode as part of the USE command rather than relying on SetExclusive() to determine it for you.
lReadOnly (Optional)
Type: Usual
TRUE attempts to open cDataFile with a read-only attribute, prohibiting updates to the work area. FALSE attempts to open cDataFile with a read-write attribute, allowing updates.
If lReadOnly is omitted, the default value is FALSE.
If cDataFile cannot be accessed using the indicated attribute, a runtime error is raised.
lOnline (Optional)
Type: Usual
This represents the ONlINE clause of the USE command.
lAdmin (Optional)
Type: Usual
This represents the ADMIN clause of the USE command.
lAgain (Optional)
Type: Usual
This represents the AGAIN clause of the USE command.
lNoData (Optional)
Type: Usual
This represents the NODATA clause of the USE command.
lNoRequery (Optional)
Type: Usual
This represents the NOREQUERY clause of the USE command.
nDataSession (Optional)
Type: Usual
This represents the SESSION clause of the USE command.
uConnection (Optional)
Type: Usual
This represents the CONNSTRING clause of the USE command.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE.
Remarks
DBUseAreaFox() is a functional equivalent of the FoxPro USE command.
For more information, refer to the USE command.
See Also