CADOParameter pParamIn(CADORecordset::typeChar, sizeof(char)*50);
CString a="guanchanghui";
pParamIn.SetValue(a);
CADOCommand pCmd(&m_pDb, "GetPrivateServer");
pCmd.AddParameter(&pParamIn);
CADORecordset* prs = new CADORecordset(&m_pDb);
if(m_pRs.Execute(&pCmd))
{
if(m_pRs.Execute(&pCmd))
{
//执行SELETE语句
_RecordsetPtr m_pRecordset;
while (!m_pRs.IsEOF())
{
m_pRecordset=m_pRs.GetRecordset();
CString ServerIP,RoleName;
ServerIP = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("serverip");
RoleName = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("RoleName");
m_serverip+=ServerIP+" "+RoleName;
m_serverip+=" ";
UpdateData(FALSE);
m_pRs.MoveNext();
}
}
CString a="guanchanghui";
pParamIn.SetValue(a);
CADOCommand pCmd(&m_pDb, "GetPrivateServer");
pCmd.AddParameter(&pParamIn);
CADORecordset* prs = new CADORecordset(&m_pDb);
if(m_pRs.Execute(&pCmd))
{
if(m_pRs.Execute(&pCmd))
{
//执行SELETE语句
_RecordsetPtr m_pRecordset;
while (!m_pRs.IsEOF())
{
m_pRecordset=m_pRs.GetRecordset();
CString ServerIP,RoleName;
ServerIP = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("serverip");
RoleName = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("RoleName");
m_serverip+=ServerIP+" "+RoleName;
m_serverip+=" ";
UpdateData(FALSE);
m_pRs.MoveNext();
}
}
}
delete prs;