Some Embedded SQL applications require or benefit from having more than one active Adaptive Server Enterprise connection. For example:
An application that requires multiple Adaptive Server Enterprise login names can have a connection for each login account.
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 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.
If 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 fail.