ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 325
SQL Statements A - D
CONNECT
CONNECT
The CONNECT statement initiates a connection with a given DBEnvironment. This
connection is the current connection. Any SQL statements issued apply to the current
connection.
Scope
ISQL or Application Programs
SQL Syntax
CONNECT TO {
‘DBEnvironmentName’
:
HostVariable1
}[AS {
‘ConnectionName’
:HostVariable2
}]
[USER {
‘UserID’
:HostVariable3
}[USING :
HostVariable4
]]
Parameters
DBEnvironmentName
identifies the DBEnvironment to be used. Any path name
you specify, unless absolute, is assumed to be relative to
your current working directory.
HostVariable1
is a character string host variable containing the name of
a DBEnvironment.
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. If a
ConnectionName
is not specified,
DBEnvironmentName
is the default.
ConnectionName
cannot exceed 128 bytes.
HostVariable2
is a character string host variable containing the
ConnectionName
associated with this connection.
UserID
is a string literal identifying the user associated with this
connection.
UserID
cannot exceed 64 bytes.
HostVariable3
is a character string host variable containing the
UserID
associated with this connection.
HostVariable4
is a character string host variable containing the
connection password associated with the specified user
identifier. The connection password assigned to
HostVariable4
cannot exceed 64 bytes.