SetDBConnection 

Syntax:             BOOL SetDBConnection (LPCTSTR sConnStr);

Return Value:    TRUE if operation successful, otherwise FALSE.

Parameter:

sConnStr     Specifies a connection string to be passed to ELS-QB.

Remarks:

Call this method to set the the connection string of the currently open connection node to the value of sConnStr.

Note: A connection node must be open In the Connectiions Pane of ELS-QBComponent to be able to apply this function.

 Example:

This sample code shows how to set new connection string for currently active connection in ELS-QB component..

      BOOL CELS_QBDemoView::SetConnString(LPCTSTR lpNewConnStr)

{

CString strCurrConn = m_QBCtrl.GetDBConnection();

if(strCurrConn != lpstrNewConnStr)

      return m_QBCtrl.SetDBConnectionName(lpNewConnStr);

return true ;

}