Tells whether a database is connected. If logical
name is the logical name or alias is the alias
of a connected database, the CONNECTED function returns TRUE; otherwise, it
returns FALSE.
Syntax
CONNECTED ( logical-name | alias )
|
-
logical-name
- Refers to a logical name. It can be a quoted string or a character expression.
An unquoted character string is not allowed.
-
alias
- Refers to an alias. It can be a quoted string or a character
expression. An unquoted character string is not allowed.
Example
This
procedure runs r-dispcu.p if a database with
the logical name sports2000 is connected:
r-cnctd.p
IF CONNECTED("sports2000") THEN RUN r-dispcu.p.
|
Notes
- By default the AVM disconnects all databases at the end of a session. The
DISCONNECT statement, which explicitly disconnects a database, does not
execute until all active procedures that reference the database end or stop. Therefore the
disconnection may happen later than the end of a transaction.
See also
ALIAS function, CONNECT statement, 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, SDBNAME function