Some Embedded SQL applications require or benefit from having more than one active Adaptive Server connection. For example:
An application that requires multiple Adaptive Server login names can have a connection for each login account name.
By connecting to more than one server, an application can simultaneously access data stored on different servers.
A single application can have multiple connections to a single server or multiple connections to different servers. Use the connect statement’s at connection_name clause to name additional connections for an application.
If you open one connection and then another new named or unnamed connection, the new connection is the current connection.
If you are creating stored procedures with the precompiler
for appropriate SQL statements with the precompiler, then for each
Embedded SQL file, the precompiler will generate 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.