Connecting to a server

Use the connect statement to establish a connection between an application program and Adaptive Server. If an application uses both C and COBOL languages, the first connect statement must be issued from a COBOL program.

The syntax for the connect statement is:

exec sql connect :user [identified by :password]  
 [at :connection_name] [using :server] 
 [label_name label_name label_value label_value...]
 end-exec

Each of the following sections describes one of the connect statement’s arguments. Only the user argument is required for the connect statement. The other arguments are optional.