I've developed a 64 bit MFC DLL wich needs to connect to a remote MySQL database on 32 bit server.
Used C++ MFC ODBC Consumer class derived from CRecordset.
When opening the Recordset
CustomRecordset.Open(CRecordset::snapshot,L"DSN",CRecordset::none) ODBC Dialog shows Cannot connect to MYSQL Server.
Created DSN's with both odbc administrators in C:\Windows\System32 and C:\Windows\SysWOW64. Not success.
It seems to me that the ODBC driver manager needs to communicate 64 bits application with driver in 32 bit mode.
However it's doing so in 64 bit mode, because in a localhost MySQL server (64 bits) the connection is successful.
May be it's neccesary to add any Macro or Connection Handle instruction into the DLL source code?
OS: Win 7 64 bits Ultimate
IDE: MS Visual Studio 10.0
Connection Driver installed: MySQL ODBC Connector 5.1.11 64 bits
The DLL runs into a 64 bit C++ Host Application.