5. Working with a Database : How Programming for Multiple Sessions Works : How You Can Switch Database Sessions
 
Share this page                  
How You Can Switch Database Sessions
After you have opened additional database sessions for an application, you can switch between open sessions by setting the DBSession attribute. This attribute is available for both the FrameExec object and the ProcExec object, letting you switch sessions in a frame or in a 4GL procedure.
You can switch to an open session in any of the following locations:
The initialize block of the called frame
A frame-invoking statement (callframe, openframe, or gotoframe) in the calling frame or procedure
An event block
A 4GL procedure
A 3GL procedure
The following subsections describe how to switch databases in each of these situations.