SDBNAME function

Accepts an integer expression or a character expression as a parameter. If the parameter resolves to a currently connected non-OpenEdge database then the SDBNAME function returns the logical name of the schema holder database containing the non-OpenEdge schema. If the parameter resolves to a currently connected OpenEdge database, the SDBNAME function returns the logical name of this database.

Syntax

SDBNAME ( { integer-expression | logical-name | alias } )
integer-expression
If the parameter supplied to SDBNAME is an integer expression, and there are, for example, three connected databases, then SDBNAME(1), SDBNAME(2), and SDBNAME(3) return the logical names of their respective schema holder databases. Also, if there are three connected databases, SDBNAME(4), SDBNAME(5), etc., return the Unknown value (?).
logical-name or alias
These forms of the SDBNAME function require a quoted character string or a character expression as a parameter. If the parameter is the logical name of a connected database or an alias of a connected database, then the logical name of the schema holder database is returned according to the rule. Otherwise, SDBNAME returns the Unknown value (?).

Example

This procedure displays schema holder databases, if applicable, for all connected databases:

r-sdbnm.p

DEFINE VARIABLE ix AS INTEGER NO-UNDO.

REPEAT ix = 1 TO NUM-DBS:
  DISPLAY SDBNAME(ix) SDBNAME(ix) = LDBNAME(ix)
  FORMAT "SCHEMA-HOLDER/SUB-SCHEMA        "
    COLUMN-LABEL "  DataServer!Classification".
END.

See also

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