Language Reference Guide : System Classes : DBSessionObject Class : OpenNewConnection Method
 
Share this page          
OpenNewConnection Method
The OpenNewConnection method opens a new connection to the same database as an existing connection using the existing connection (including its flag parameter settings) as the basis for the new connection.
This method has the following syntax:
DBSessionObject = OldDBSessionObject.OpenNewConnection()
This method uses the following variable:
OldDBSessionObject
Is a reference variable that specifies the existing session
This method is commonly used to allow two or more concurrent transactions against the same database. In OpenROAD, such instances often occur when two or more concurrent frames are open and each frame wants to access the database. Using the OpenNewConnection method, you can provide separate but identical sessions for each frame and its transaction.
The value of the State attribute (see State Attribute) of the existing session must be DS_CONNECTED, or the method fails. If successful, the method returns the DBSessionObject for the newly created session. If unsuccessful, the returned session object is null.