Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Database Access : Database connections : OpenEdge database connection functions
 
OpenEdge database connection functions
The following table lists the ABL functions that allow you to test database connections, get information on connected databases, and get information on the types of databases that you can access.
Table 3. ABL database functions
ABL function
Description
CONNECTED
Tests whether a given database is connected
DATASERVERS
Returns a character string containing a list of database types supported by the installed OpenEdge product; for example, "OpenEdge,ORACLE."
DB-REMOTE-HOST
Returns a character string containing the IP address of the database connection
DBRESTRICTIONS
Returns a character string that describes the OpenEdge features that are not supported for a particular database, for example, if the database is an ORACLE database, the return string is: "LAST,PREV,RECID,SETUSERID"
DBTYPE
Returns the database type of a currently connected database, for example "OpenEdge," "ORACLE," etc.
DBVERSION
Returns the version of the currently connected database
FRAME–DB
Returns a character string that contains the logical name of the database for the field in which the cursor was last positioned for input
NUM–DBS
Returns the number of connected databases
LDBNAME
Returns the logical name of a currently connected database
PDBNAME
Returns the physical name of a currently connected database
SDBNAME
Returns the logical name of a schema holder for a database
For more information on these functions, see OpenEdge Development: ABL Reference.
Use these functions to perform various tasks related to connection, such as determining connection status. The i-infor.p procedure displays a status report for all connected databases.
i-infor.p
DEFINE VARIABLE ix AS INTEGER NO-UNDO.

DO ix = 1 TO NUM-DBS WITH DOWN:
  DISPLAY PDBNAME(ix) LABEL "Physical Database"
    LDBNAME(ix) LABEL "Logical Name"
    DBTYPE(ix) LABEL "Database Type"
    DBRESTRICTIONS(ix) LABEL "Restrictions"
    SDBNAME(LDBNAME(ix)) LABEL "Schema Holder DB".
END.