MFC ADO连接ACCESS 从数据库传值到对话框的编辑框中 代码出错 HELP解决办法

MFC ADO连接ACCESS 从数据库传值到对话框的编辑框中 代码出错 HELP
CString sql,str;

sql = "select * from boli where id = '"+m_strID+"'";
m_pRecordset.CreateInstance("ADODB.Recordset");
m_pRecordset->Open(_variant_t(sql),_variant_t((IDispatch *)theApp.m_pConnection,true),adOpenDynamic,adLockPessimistic,adCmdText);

if(m_pRecordset->GetRecordCount()!= 0)
{
UpdateData(TRUE);
m_fImport =(float)m_pRecordset->GetCollect("import");
m_fNational =(float)m_pRecordset->GetCollect("national");
UpdateData(FALSE);

}
m_pRecordset->Close();

这串代码有什么问题呀。为什么编译无错,运行后,在编辑框内输入值后 马上就弹出 debug error 强制终止的错误呢。。?
各位大虾 帮帮忙~~~ 很急 555555555555555555~~~~~~~

------解决方案--------------------
catch(_com_error e)///捕捉异常

AfxMessageBox(e->ErrorMessage());///显示错误信息
}
------解决方案--------------------
你先确定下你的sql语句有问题没有
打开access在里面输入sql语句检查有问题没有
然后在try语句块内第一条语句加断电调试。
------解决方案--------------------
CString strValue = (char*)(_bstr_t)pres->GetCollect((_variant_t)"field2");
float f = atof(strValue);
------解决方案--------------------
m_fImport = m_pRecordset->GetCollect("import"); ??
m_fNational = m_pRecordset->GetCollect("national");???

m_pRecordset->GetCollect("national")
得到的类型不能直接给到 float类型。要转换一下。。。!
------解决方案--------------------
探讨
引用:
CString strValue = (char*)(_bstr_t)pres->GetCollect((_variant_t)"field2");
float f = atof(strValue);

好像是读取不到数据 但是不懂为什么会读不到。