ADATABASES( ) Function

Example   See Also

Places the names of all open databases and their paths into a variable array.

Syntax

ADATABASES(ArrayName)

Returns

Numeric

Arguments

ArrayName

Specifies the name of the array. If the array you specify doesn't exist, Visual FoxPro automatically creates the array. If the array exists and isn't large enough to contain all the database information, Visual FoxPro automatically increases the size of the array to accommodate the information. If the array is larger than necessary, Visual FoxPro 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.

Remarks

The names of all open databases in the current data session are placed into a variable array.

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.