VS2010MFC 数据库access编程Microsoft C++ 异常: 内存位置 0x001def14 处的 _com_error
VS2010MFC 数据库access编程老是有错啊,请大神们看看瞧瞧,指导指导额m_grid.SetExtendedStyle(LVS_EX_FLATSB|LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP|LVS_EX_ONECLICKACTIVATE|LVS_EX_GRIDLINES);
m_grid.InsertColumn(0,"编号",LVCFMT_LEFT,100,0);
m_grid.InsertColumn(1,"性别",LVCFMT_LEFT,100,1);
m_grid.InsertColumn(2,"年龄",LVCFMT_LEFT,100,2);
//m_grid.InsertColumn(3,"家庭住址",LVCFMT_LEFT,100,3);
ADOConn m_AdoConn;
m_AdoConn.OnInitADOConn();
CString sql;
sql.Format("select* from human order by id desc");
_RecordsetPtr m_pRecordset;
m_pRecordset = m_AdoConn.GetRecordSet((_bstr_t)sql);
while(m_AdoConn.m_pRecordset->adoEOF==0)
{
m_grid.InsertItem(0,"");
m_grid.SetItemText(0,0,(char*)(_bstr_t)m_pRecordset->GetCollect("id"));
m_grid.SetItemText(0,1,(char*)(_bstr_t)m_pRecordset->GetCollect("sex"));
m_grid.SetItemText(0,2,(char*)(_bstr_t)m_pRecordset->GetCollect("age"));
//m_grid.SetItemText(0,3,(char*)(_bstr_t)m_pRecordset->GetCollect("address"));
m_pRecordset->MoveNext();Microsoft C++ 异常: 内存位置 0x001def14 处的 _com_error
可以的话,可以再在回复中要源码查看。。。谢谢