Top  Previous  Next


The QMConnectPool() function establishes a QMClient session using connection pooling.


The function arguments are:


Hostis the IP address or name of the server system. Use of IPV6 addresses requires that the QMConnectionType() function is used first to enabled IPV6 support.


Portis the port number to which connection is to be made. Set this to -1 to use the default QMClient port.


UserNameis the user name under which the server process is to run.


Passwordis the password for the given UserName.


Accountis the name of the QM account to be accessed.


Poolis the connection pool name.


The QMConnectPool() function attempts to establish a QMClient process on the system identified by the Host argument. If successful, the function returns True. If unsuccessful, the function returns False and the QMError() function can be used to retrieve a text error message identifying the cause of the failure. If there is an idle QMClient process that matches the user, account and pool names, the function connects to this session rather than creating a new one.


A single client may open multiple connections simultaneously. For the C and VB.Net variants of QMClient, the internal session number associated with the session opened by QMConnectPool() can be retrieved using QMGetSession(). All subsequent QMClient function calls relate to the most recently opened session unless QMSetSession() is used to select an alternative session. For the QMBasic class module, Java and Python variants of QMClient, each session is instantiated as a separate object.


QMClient sessions run the MASTER.LOGIN and/or LOGIN paragraph (if present). A QMClient session can be recognised within these paragraphs by testing the value of @TTY which will be "vbsrvr" for QMClient. Note that a prompt for input within the actions performed by the paragraph cannot be handled via QMClient.







hmtoggle_plus1QMBasic Class Module







See also:

Connection pooling, QMDisconnect, QMPoolIdle()