tags:

views:

62

answers:

0

I am using ADO to query the data in a table of MS Access Database, the following code works well on my local computer that I has installed Visual Studio 2005 and Office, then I move the compiled binary exe file to a newly-installed Windows XP computer, the program will throw out an exception:

"Code = 80040e37, Msg: I, Source: Microsoft JET Database E ngine, Description: The Microsoft Jet database engine could not find the object 'reverse6'. Make sure the object exists and that you spell its name and the pat h name correctly.]CreateForeignKeySQL error [Code = 800a0cb3, Msg: U, Source: AD ODB.Connection, Description: Object or provider is not capable of performing req uested operation."

sprintf(szSQL, "select * from %s", szTableName);

try
{
      _bstr_t strCmd = szSQL;
      m_pRecordset = m_pConnection->Execute(strCmd, &RecordsAffected, ADODB::adCmdText);
      ......
}
catch (_com_error e)
{

}

What should I need to do additionally? I have installed MDAC on that Windows XP computer, but it works to no avail. Maybe I need to installed Microsoft Office as well?