I have a simple piece of code written in C++ (Visual Studio Professional 2019) to open a (32-bit) access database :
#import "c:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace rename("EOF", "EndOfFile")
try
{
// open connection
m_pConnectionPtr.CreateInstance(__uuidof(Connection));
bstr_t strCnn("Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\\MyDatabase.mdb;User ID=sa;");
m_pConnectionPtrReceptuur->Open(strCnn, "", "", NULL);
}
catch (_com_error& e)
{
// do something
}
This works fine when compiling x86. When setting my environment to x64 I enter the catch with error 0x80004005 which means 'unspecified error'. Do I have to convert my access database to 64 bit or am I missing something else?
Thanks for any suggestions!
User contributions licensed under CC BY-SA 3.0