解决方案:
try
{
hr = m_pConnection.CreateInstance("ADODB.Connection");///
if( TRUE == SUCCEEDED(hr))
{
strDBFile = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDBFile;
hr = m_pConnection->Open((_bstr_t)strDBFile ,_bstr_t(strUser),_bstr_t(strUser),adModeUnknown);
}
}
catch(_com_error e)
{
CString errormessage;
errormessage.Format("%s",e.ErrorMessage());
AfxMessageBox(errormessage);
return FALSE;
}
3COME考试频道为您精心整理,希望对您有所帮助,更多信息在http://www.reader8.com/exam/