ADatabases Function | |
Places the names of all open databases and their paths into a variable array.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION ADatabases(
ArrayName AS ARRAY
) AS DWORD
public static uint ADatabases(
Array ArrayName
)
Request Example
View SourceParameters
- ArrayName
- Type: Array
Specifies the name of the array.
Return Value
Type:
DWord
Numeric
Remarks
The names of all open databases are placed into a variable array.
If the array you specify doesn't exist, X# automatically creates the array.
If the array exists and isn't large enough to contain all the database information,
X# automatically increases the size of the array to accommodate the information. If the array is larger than necessary, X# truncates the array.
If the array exists and ADatabases( ) returns 0 because no databases are open, an existing array remains unchanged.
If the array doesn't exist, and ADatabases( ) returns 0, the array is not created.
ADatabases( ) creates a two-dimensional array. The first column of the array contains the names of the open databases,
and the second column contains the paths to the databases.
ADatabases( ) returns the number of database names (rows) in the array. If no databases are open, ADatabases( ) returns 0 and the array isn't created.
Examples 1Set PATH TO (HOME(2) + 'data\')
2Open Database testdata
3Clear
4? ADatabases(gaDatabase)
5Display MEMORY LIKE gadatabase
6Close Databases
See Also