Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : DBVERSION function
 

DBVERSION function

Returns, as a character string, the version number of an OpenEdge database.

Syntax

DBVERSION ( integer-expression|logical-name|alias )
integer-expression
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.

See also

ALIAS function, CONNECT statement, CONNECTED function, CREATE ALIAS statement, CREATE CALL statement, DATASERVERS function, DBCODEPAGE function, DBCOLLATION function, DBRESTRICTIONS function, DBTYPE function, DELETE ALIAS statement, DISCONNECT statement, FRAME-DB function, LDBNAME function, NUM-DBS function, PDBNAME function, SDBNAME function