RemoveConnection
Syntax:
BOOL RemoveConnection(LPCTSTR
sConnName);
Return
Value: TRUE if the
connection was found and operation was successful, otherwise
FALSE.
Parameters:
sConnName
Pointer
to a string representing the connection name.
Remarks:
Call
this method to remove an existing connection by specifying the connection node’s
name.
Example:
This following code demonstrates how to remove the
connection created in OpenConnection() Example.
.........................
DeleteConnection(_T(“Northwind”);
.........................
BOOL
CELS_QBDemoView::DeleteConnection (LPCTSTR lpstrConn)
{
CString
strConnStr = m_QBCtrl.GetConnection(lpstrConn);
if(!strConnStr.IsEmpty())
return
m_QBCtrl.RemoveConnection(lpstrConn);
return false
;
}