Progress
Embedded SQL-92
Guide and Reference


CONNECT by DEFAULT

The CONNECT statement with the DEFAULT keyword establishes a connection to a default database. The default database is the one set in the environment variable DB_NAME.

To connect to the DEFAULT database, use this CONNECT statement:

EXEC SQL
     CONNECT TO DEFAULT; 

The CONNECT statement does not specify a connection_name. No connection name is needed for the DEFAULT connection since you can always refer to this connection with the keyword DEFAULT. If an application executes an SQL statement before establishing a connection to a database, the SQL engine attempts to connect to an environment-defined database. If the connection is successful, the database executes the SQL statement.


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