5. Working with a Database : How Programming for Multiple Sessions Works : How You Can Switch Database Sessions : How You Can Switch Sessions for a 4GL Procedure
 
Share this page                  
How You Can Switch Sessions for a 4GL Procedure
To switch sessions from within a local 4GL procedure, you must set the CurProcedure.DBSession attribute for the ProcExec object. For example, the following statement switches the current procedure to the session represented by the DBSessionObject third_session:
CurProcedure.DBSession = third_session;
Note:  In contrast to the CurProcedure.DBSession attribute, setting the CurFrame.DBSession attribute from within a local procedure will not change the local procedure's session. Instead, it changes the calling frame's session after the local procedure returns.