Progress
Language Reference


SDBNAME Function

Interfaces
OS
SpeedScript
All
All
Yes

Accepts an integer expression or a character expression as a parameter. If the parameter resolves to a currently connected non-Progress database then the SDBNAME function returns the logical name of the schema holder database containing the non-Progress schema. If the parameter resolves to a currently connected Progress 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 DATABASE 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 © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095