Connection Identifiers

The optional connection name is a unique identifier that an ESQL/C application can use to refer to a connection in subsequent SET CONNECTION and DISCONNECT statements. If the application does not provide a connection name (or a connection host variable), it can refer to the connection using the database environment. If the application makes more than one connection to the same database environment, however, each connection must have a unique name.

Only the CONNECT statement can use the AS keyword to declare a connection name. The CONNECT statement cannot, however, reference a previously declared connection name to specify a connection to a database environment.