GetConnectionObj 

Syntax:             LPUNKNOWN GetConnectionObj ();

Return Value:    The pointer to IUnknown interface of a connection object represented by the currently selected connection container in the Databases folder of the ELS-QB component or NULL if no connection container selected.

Remarks:

Call this method to obtain a pointer to an active connection object of ELS-QB component.

Example:

This sample code demonstrates  how to use the pointer ELS-QB control’sinternal Connection object returned  by GetConnectionObj() method to Manipulate with some properties of it (i.e. set Connection object’s timeout).

void CELS_QBDemoView:: SetConnTimeout(_ConnectionPtr pConn)

{

if(pConn == NULL)

return;

pConn-> ConnectionTimeout = 30;

}

..................

..................

void CELS_QBDemoView::OnCommandSetConnectionTimeout()

{

SetConnTimeout(m_QBCtrl.GetRecordsetObj());

}