ConnectionsInfo Object
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[0];
var CurrentConnection = connections.current;
if ((SQLiteConnection == FirstConnection) && (SQLiteConnection != CurrentConnection))
connections.currentIndex = 0;
Properties
current
Returns the currently active connection as a ConnectionInfo Object.
currentIndex
Returns the index of the current connection. It can be changed to select another connection.
count
Returns the number of connections available.
Functions
find(name)
Returns a connection by name (ConnectionInfo Object).