Establishing multiple connections

Some Embedded SQL applications require or benefit from having more than one active Adaptive Server connection. For example:

A single application can have multiple connections to a single server or multiple connections to different servers. Use the connect statement’s atconnection_name clause to name additional connections for an application.

If you open a connection and then another new named or unnamed connection, the new connection is the current connection.

NoteIf you are generating stored procedures with the precompiler for appropriate SQL statements, then for each Embedded SQL file, the precompiler generates a single file for all stored procedures on all servers. You can load this file into the appropriate server(s). Although the server(s) will report warnings and errors about being unable to read the procedures intended for other servers, ignore them. The stored procedures appropriate for each server will load properly on that server. Be sure to load the stored procedures on all applicable servers or your queries will fail.