Difference between revisions of "ADATABASES()"

From Lianjapedia
Jump to: navigation, search
Line 26: Line 26:
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Databases]]
 
[[Category:Databases]]
[[Category:Cursor Functions]]
 
[[Category:Array Processing Functions]]
 
 
[[Category:Database Functions]]
 
[[Category:Database Functions]]

Revision as of 12:13, 4 February 2013

Purpose

Function to place the names of all open databases and their paths into a variable array.

Syntax

ADATABASES(<array>)

See Also

ADIR(), ALIAS(), 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 names of all open databases and their paths into a variable array. The name if 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 an open database, the second the path for that database.

The ADATABASES() function returns the number of database names 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 databases, not tables.

Example

OPEN DATABASE hr EXCLUSIVE
nDatabases = adatabases(aDBCNames)
CLOSE DATABASES