ALLBASE/SQL Reference Manual (36216-90216)

326 Chapter10
SQL Statements A - D
CONNECT
Description
ALLBASE/SQL creates an implicit, brief transaction when the CONNECT statement is
issued.
When the value of the autostart flag is ON, the CONNECT statement initiates a
single-user DBE session if the DBECon file user mode is currently set to
single
and no
other user is accessing the DBEnvironment. A multiuser DBE session is established if
the DBECon file user mode is currently set to MULTI.
If the value of the autostart flag is OFF, the CONNECT statement is used to initiate a
multiuser session after a START DBE statement has been processed.
When more than one CONNECT statement is issued, the application (or ISQL) is
currently connected to the DBEnvironment specified by the most recent CONNECT
statement. The current connection can be changed with the SET CONNECTION
statement.
The USER and USING clauses are implementation-defined features intended for use in
determining if a CONNECT statement should be accepted or rejected. They are
not
currently used by ALLBASE/SQL as criteria for accepting or rejecting a CONNECT
statement. However, other database products in a network environment may require
them in order to granulize authorization to a connection level.
Authorization
You can use this statement if you have CONNECT or DBA authority for the specified
DBEnvironment.
Example
A user whose current working directory is just above the sampledb directory begins a DBE
session; the value of the autostart mode is ON. The PartsDBE DBEnvironment is
currently configured to operate in multiuser mode, so other users can also initiate DBE
sessions.
CONNECT TO 'sampledb/PartsDBE'
A second user starts a DBE session from a different directory.
CONNECT TO '../sampledb/PartsDBE'
Specifying a connection name
CONNECT TO 'sampledb/PartsDBE' AS 'Parts1'
Parts1 is the connection name to be used with multiconnect functionality.