5. Working with a Database : How Programming for Multiple Sessions Works : How You Can Open a New Database Session
 
Share this page                  
How You Can Open a New Database Session
Before you can open a session other than a frame's starting session, you must create the DBSessionObject object for the new session by declaring a global or local reference variable of type DBSessionObject.
Declaring the variable globally lets you open the session represented by the variable in any frame of the application. If you declare a local variable, you can reference that variable in the frame in which the variable is declared or pass it to a frame or procedure called by that frame. You can open the session only within the frame in which you declared it or in subsequent frames or procedures called by that frame.
The DBSessionObject system class provides the following two methods for opening a new connection to a database:
The Connect method
The OpenNew Connection method