QMSetSession()

QMSetSession()

Top  Previous  Next

 

The QMSetSession() function selects an active QMClient session to be referenced by subsequent function calls.

 

A single client may open multiple QMClient connections, each identified by a session number. The QMSetSession() function determines to which session subsequent QMClient function calls relate.

 

The return value from this function is True if successful, False if the specified session does not exist.

 

The QMSetSession() function has no equivalent in the QMBasic class module, Java or Python variants of the QMClient API as each session is managed by a separate instantiation of the object.

 

The examples below save the current session number into a variable named OldSesNum, open a new connection (which will create a new session), perform some processing, disconnect the new session and then use QMSetSession() to revert to the original session.

 

 

hmtoggle_plus1C

 

hmtoggle_plus1VB.Net

 

 

See also:

QMGetSession()