CRecordset *pSet = new CRecordset(&m_database);
try
{
pSet->open(CRecordset::snapshot,'select count(xx) from aTable where xxx',CRcordset::none);
}catch(CDBException *e)
{
//you want to do
}
CString tmp ;
while(!pSet->IsEof() && pSet->GetODBCFieldCount() > 0)
{ pSet->GetFieldValue((short)0,tmp);
}
这里tmp识你想要的,
i have no msdn now ,and i did not write the code like this so long ,so it may be have something wrong but i think you will got it. if you want to got another type of this result ,just change it .
try
{
pSet->open(CRecordset::snapshot,'select count(xx) from aTable where xxx',CRcordset::none);
}catch(CDBException *e)
{
//you want to do
}
CString tmp ;
while(!pSet->IsEof() && pSet->GetODBCFieldCount() > 0)
{ pSet->GetFieldValue((short)0,tmp);
}
这里tmp识你想要的,
i have no msdn now ,and i did not write the code like this so long ,so it may be have something wrong but i think you will got it. if you want to got another type of this result ,just change it .
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货