The ConnectionsInfo object can be used to list all connections on the Data Abstract server. When a script is running on the server, the ConnectionsInfo object is accessible through the Global Object's connections, and can be used to find and change the active connection. The default indexer returns the ConnectionInfo Object by index.
The code snippet below shows how the ConnectionsInfo object can be used:
var SQLiteConnection = connections.find('PCTrade.SQLite'); var FirstConnection = connections; var CurrentConnection = connections.current; if ((SQLiteConnection == FirstConnection) && (SQLiteConnection != CurrentConnection)) connections.currentIndex = 0;
Returns the currently active connection as a ConnectionInfo Object.
Returns the index of the current connection. It can be changed to select another connection.
Returns the number of connections available.
Returns a connection by name (ConnectionInfo Object).