4,011
社区成员
发帖
与我相关
我的任务
分享
float mchd = 12;
strSQL.Format("select * from GTAW_TJ_GYCS_BXG where mchd_min<=%f and mchd_max>=%f", mchd, mchd);
try
{
m_pRst->Open((_variant_t)strSQL,m_pConn.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText);
}
catch(_com_error e)
{
AfxMessageBox("读取数据库表失败!");
return;
}
while(!m_pRst->adoEOF)
{
if(m_pRst->GetCollect("hjdl").vt != VT_NULL)
hjdl = (LPCTSTR)(_bstr_t)(m_pRst->GetCollect("hjdl"));
m_pRst->MoveNext();
}
m_pRst->Close();