Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## 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 i AS INTEGER.
>     REPEAT i= 1 TO NUM-DBS:
>       DISPLAY SDBNAME(i)
>       SDBNAME(i) = LDBNAME(i)
>       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

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095