主题:请教ADO运行错误的问题
大家好,帮我看看什么原因,先谢过。::CoInitialize(NULL);
m_pConnection.CreateInstance(__uuidof(Connection));
try
{
//Open the Access database User.mdb
m_pConnection->Open( "Provider=MSDAORA.1;User ID=dbemployee;Data Source=employee;Persist Security Info=False","","",adModeUnknown);
}
catch(_com_error e)
{
MessageBox(0,"",e.ErrorMessage(),MB_OK);
return FALSE;
}
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
出现IDispatch error #3149
m_pConnection.CreateInstance(__uuidof(Connection));
try
{
//Open the Access database User.mdb
m_pConnection->Open( "Provider=MSDAORA.1;User ID=dbemployee;Data Source=employee;Persist Security Info=False","","",adModeUnknown);
}
catch(_com_error e)
{
MessageBox(0,"",e.ErrorMessage(),MB_OK);
return FALSE;
}
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
出现IDispatch error #3149