OpenDBConnection 

Syntax:             BOOL OpenDBConnection(LPCTSTR sConnName);

Return Value:    TRUE if the connection is opened successfully, otherwise returns FALSE.

Parameters:

                        sConnName     Specifies the name of an existing connection to open.

Remarks:

Call this method to open an existing connection specifying only the connection name.

Example:

This sample code shows how to open specified connection in ELS-QB component..

      BOOL CELS_QBDemoView::OpenConnection(LPCTSTR lpstrConnName)

{

CString strCurrName = m_QBCtrl.GetConnectionName();

if(!lpstrConnName->IsEmpty() && strCurrName != lpstrConnName)

return m_QBCtrl.OpenDBConnection(lpstrConnName);

return true ;

}