ALLBASE/SQL Reference Manual (36216-90216)

Chapter 12 519
SQL Statements S - Z
SET CONNECTION
SET CONNECTION
The SET CONNECTION statement sets the current connection within the list of connected
DBEnvironments. Any SQL statements issued apply to the current connection.
Scope
ISQL or Application Programs
SQL Syntax
SET CONNECTION {
‘ConnectionName’
:HostVariable
}
Parameters
ConnectionName
is a string literal identifying the name associated with this connection.
This name must be unique for each DBEnvironment connection within an
application or an ISQL session.
ConnectionName
cannot exceed 128
bytes.
HostVariable
is a character string host variable containing the
ConnectionName
associated with this connection.
Description
A connection to any one of the list of connected DBEnvironments can be the current
connection. When the current connection is set from one DBEnvironment to another,
any previously connected DBEnvironment is said to be suspended.
If a previously suspended DBEnvironment connection again becomes the current
connection, all DBEnvironment context information for the current connection is
restored to the same state as at the time when the DBEnvironment was suspended.
A connection with the DBEnvironment referenced in this statement must have
previously been established using either a CONNECT, START DBE, START DBE NEW,
or START DBE NEWLOG statement. This connection must not have been terminated by a
DISCONNECT, RELEASE, or STOP DBE statement.
No stored section is created for the SET CONNECTION statement. SET CONNECTION
cannot be used with the PREPARE or EXECUTE IMMEDIATE statements or procedures.
An active transaction is not required to execute a SET CONNECTION statement. An
automatic transaction will
not
be started when executing a SET CONNECTION
statement.
Authorization
You do not need authorization to use the SET CONNECTION statement.