Difference between revisions of "ADATABASES()"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
− | Function to place the | + | Function to place the name of the open database and its path into a dynamic array. |
==Syntax== | ==Syntax== | ||
Line 9: | Line 9: | ||
==Description== | ==Description== | ||
− | The ADATABASES() function is used to place the | + | The ADATABASES() function is used to place the name of the open database and its path into a dynamic array. The name of the array is specified in <array>. If the array does not exist, it is created. If the array is smaller or larger than required, it is resized. The array is two-dimensional with two columns. The first column contains the name of the open database, the second the path for that database. |
− | The ADATABASES() function returns the | + | The ADATABASES() function returns 1 if the open database name has been added to the array. If no databases are open or the array cannot be created, the ADATABASES() function returns 0. |
− | NOTE: The ADATABASES() function operates on | + | NOTE: The ADATABASES() function operates on the open database, not tables. |
==Example== | ==Example== |
Revision as of 10:31, 11 November 2014
Contents
Purpose
Function to place the name of the open database and its path into a dynamic array.
Syntax
ADATABASES(<array>)
See Also
ADIR(), ALIAS(), ATABLES(), CLOSE DATABASES, COPY DATABASE, DATABASE(), DBC(), DBF(), DBUSED(), DISPLAY SCHEMAS, DISPLAY STATUS, GETENV(), LIST SCHEMAS, LIST STATUS, OPEN DATABASE, SET SQL, USE, USED()
Description
The ADATABASES() function is used to place the name of the open database and its path into a dynamic array. The name of the array is specified in <array>. If the array does not exist, it is created. If the array is smaller or larger than required, it is resized. The array is two-dimensional with two columns. The first column contains the name of the open database, the second the path for that database.
The ADATABASES() function returns 1 if the open database name has been added to the array. If no databases are open or the array cannot be created, the ADATABASES() function returns 0.
NOTE: The ADATABASES() function operates on the open database, not tables.
Example
OPEN DATABASE hr EXCLUSIVE nDatabases = adatabases(aDBCNames) CLOSE DATABASES