The sequence number of a database the ABL session is connected to. For example, DBVERSION(1) returns information on the first database the ABL session is connected to, DBVERSION(2) returns information on the second database the ABL session is connected to, etc. If you specify a sequence number that does not correspond to a database the ABL session is connected to, the DBVERSION function returns the Unknown value (?).
logical-name or alias
These forms of the DBVERSION function require a quoted character string or a character expression as a parameter. If the parameter is an alias of a connected database or the logical name of a connected database, then the AVM returns the version number. Otherwise, it returns the Unknown value (?).
Example
This procedure displays the version number of all connected databases:
r-dbvers.p
DEFINE VARIABLE ix AS INTEGER NO-UNDO.
REPEAT ix = 1 TO NUM-DBS:
DISPLAY LDBNAME(ix) DBVERSION(ix) WITH 1 DOWN.
END.
Note
DBVERSION does not apply to non-OpenEdge data sources.