You can connect to up to 50 local or remote databases at a time. The SQL language environment keeps the connections active for the life of the HTTP server process job that Net.Data is running under. Keeping the connections active provides fast database access after the initial connection to the database. You can prevent errors and improve performance by taking the following issues into consideration:
Net.Data does not allow concurrent connections to the same remote database. If a connection exists to a remote database using one user ID (the LOGIN SQL language environment parameter) and another request is made to connect to the same remote database using a second user ID, the SQL language environment must first disconnect the existing connection, do a commit (if commitment control is being used) and then reestablish the connection using the 'new' user ID and password. The commit is required because if the connection is broken, there is no way that a rollback can be accomplished in case of an error later in the macro. Plan your connections based on the following rules:
When the SQL language environment establishes a connection to a remote system, it associates a user ID with the connection. If, on a subsequent Net.Data query, the user ID does not match those associated with the connection, the connection is ended and a new connection to the database is established (this only occurs if transaction scope is SINGLE).
To improve performance, hard code the user ID, or use the same user ID, when issuing SQL statements to a remote database. For local database access, the user ID and password are ignored.