DATABASE
The DATABASE statement specifies a default database at compile-time, or a
current database at run-time, and opens that database.
database is the unqualified name of a database. This SQL identifier can have up to 8
(for INFORMIX-SE on DOS) or up to 18 characters (for INFORMIX-OnLine on UNIX). This name is not case-sensitive. Blank spaces are not valid between quotes nor after the @ symbol.
pathname is the pathname up to the parent directory of the .DBS directory.
server is the name of the database server that is home to database.
- ariable is a variable that contains the database specification.
(You can specify a variable only in a MAIN or FUNCTION block.)
This statement is not required if your 4GL program does not reference entities
in a database.
You can use the DATABASE statement in two distinct ways, depending on the
context of the statement within its source code module:
To specify the default database for the Source Compiler to use in declaring
data types of variables indirectly with the LIKE keyword or reading syscolval or
syscolatt values for the INITIALIZE or VALIDATE statements.
To specify the current database at run-time, so that SQL statements can access
data and other entities in that database. If the local or INFORMIX-NET PC
connection is terminated, but resident in memory, DATABASE reestablishes this
run-time connection.
References
DEFINE
FUNCTION
GLOBALS
INITIALIZE
MAIN
REPORT
VALIDATE