SetConnectionName 

Syntax:             BOOL SetConnectionName (LPCTSTR sConnName);

Return Value:    TRUE if the Connection pane is visible, a connection node is active and the renaming of this connection node was successful. Otherwise returns FALSE.

Parameters:

                        sConnName    Specifies the new name, to be used to rename the currently active connection node.

Remarks:

Call this method to rename the currently active or open connection node.

Example:

This sample code shows how to rename currently active connection in ELS-QB component..

BOOL CELS_QBDemoView::RenameConnection(LPCTSTR lpstrNewName)
{
     CString strCurrName = m_QBCtrl.GetConnectionName();
     if(strCurrName.IsEmpty())  // no active connection exists
          return false;
     if(strCurrName != lpstrNewName)
          return m_QBCtrl.SetConnectionName(lpstrNewName);

     return true;
}