Access, ADO & 64-bit -


We have a large codebase that uses the ADO under 32 bit, and we convert the code to 64-bit We were using Jet Provider, but I know that it is not supported under x64 We are importing definitions from msado15.dll. The 64-bit version of this DLL was available some time ago, but we are unable to work it.

I have written a test program (using MFC, #imported DLL):


  Maps & lt; CString, CString & gt; MapResults; _ConnectionPtr pConn = NULL; Cstring strConn = _T ("Provider = Microsoft.ACE.OLEDB.14.0;") _T ("Data Source = C: \\ Program Files \\ our_company \\ our_database.mdb;"); // (String above is divided for readability only.) CRTQL = _T ("Select * FROM [our_table] by ORDER [our_field_1];"); Try {pConn.CreateInstance (__Uuidof (connection)); PConn-> Open (_bstr_t (strConn), _bstr_t (_T ("")), _bstr_t (_T ("")), -1); _CommandPtr pCommand = NULL; PCommand.CreateInstance (__Uidid (command)); PCommand-> CommandType = adCmdText; PCommand-> Active connection = pCon; PCommand-> CommandText = _bstr_t (strSQL); _RecordsetPtr pRS = NULL; PRS.CreateInstance (__Uidid (Recordset)); PRS- & gt; Cursor location = adUseClient; Prs = p-comand-> Execution (faucet, null, adcmdtext); While (pRS-> adoEOF = VARIANT_TRUE!) {Cstring strField = (LPCTSTR) (_bstr_t) pRS- & gt; Fields-> GetItem ((_bstr_t) _T ("our_field_1")) - & gt; value; Cstring strValue = (LPCTSTR) (_bstr_t) pRS- & gt; Fields-> GetItem ((_bstr_t) _T ("our_field_2")) - & gt; value; MapResults [strField] = strValue; PRS- & gt; MoveNext (); }} Hold (_com_error & amp; a) {CSSTrray; StrError.Format (_T ("Error% 08x:% s"), (int) E. Error (), E. Error Message ()); MapResults [_T ("COM error")] = strError; }  

Basically, the code will list the table if it succeeds, or if it fails, then get the list of COM error. Obviously, we tested the code under 32 bit and got the desired result.

On a 64-bit machine, the code is clearly known as 64-bit (v6.1.7600.nnn imports from version of msado15.dll). Office data provider (Access database engine_x64.exe) was applied to the machine to obtain the new database (ACODDC. DLL, v14.nnn.nnn.nnn). If I look at Data Sore under the administrator tool (I know that the ODBC is not similar to the ADO, it was just to confirm that DLL is installed correctly), it shows the expected DLL.

I can also confirm, using Process Explorer, which loads the version of msado15.dll at run time (thus it confirms that COM ADO is getting DL) 64-bit version.

I believe we have MDAC 2.8 installed (we have msado28.tlb in the same place as msado15.dll but that may have been installed by AccessDatabaseEngine_x64.exe ).

The test machine is Windows 7 Ultimate, 64-bit.

And yet, we still have COM error 0x800a0e7a (provider not found).

Is there a test code on the machine that was completely released by using VS2008 for x64. Anything can give such a suggestion why it is not working, or to verify that I should do all the right stuff on the machine (and thus, it should work))?

I would know that working under ODBC 64 (which using) but ODBC tried to rewrite our code base would be undesirable test program!

  ("provider = Microsoft. AECE.Ol.D.B. 14.0;")  

One of the things

i.e.

  ("Provider = Microsoft .ACE.OLEDB.12.0;")  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -