4,012
社区成员
发帖
与我相关
我的任务
分享
strSQL.Format("select * from Result where 1=1");
try
{
m_pRst->Open((_variant_t)strSQL, m_pConn.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText);
}
catch(_com_error e)
{
_bstr_t bstrDescription(e.Description());
_bstr_t strErrMsg = "连接数据库失败 错误描述:\r\n" + bstrDescription;
AfxMessageBox(strErrMsg);
return FALSE;
}