[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2431
  • Last Modified:

Using ADO to connect to to an Access2007 table on a 64 bit machine

Have an application which runs smoothly on a 32 bit platform, using Access as a temporary working database.  The connection string for the ADO Connection is 'Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=' +
    strLocation + '\Datadb.accdb' + ';Mode=Share Deny None;'

On the 64 bit Windows system the driver for the above is displayed as the PC has Microsoft Office 2010 - 64 bit installed.  However, when executing the application - get a message "Provider cannot be found. It may not be properly installed".

1) Is there a work around for this? or
2) Must we use a different Database?
0
dbn4Me
Asked:
dbn4Me
  • 10
  • 9
  • 2
  • +2
1 Solution
 
Alex_WCommented:
This may be of some help:

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/58c4c61e-fa86-4809-bf7d-21bacb055d3e/

Ensure the correct provider software is installed.
0
 
plummetCommented:
You could try loading the latest versions of the 64 bit drivers, available it seems from here:

http://www.microsoft.com/en-us/download/details.aspx?id=13255

Regards
John
0
 
dbn4MeAuthor Commented:
Thanks Alex I have downloaded and installed the AccessDatabaseEngine_x64 and that did not solve the problem.  Do you think I should install the the 32 bit version?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
The driver you need is determined by the version of Access that your running under, not that of the OS, so first determine which it is for sure.

A database written under a 32 bit version of Access will run under a 64 bit version without issue, unless you've made Windows API calls.  If you have, they all need to be adjusted and you'd need to use compiler directives if you still wanted to run it in both versions.

Jim.
0
 
dbn4MeAuthor Commented:
Thanks Jim,

The version of Microsoft Office running on the targeted machine is 64 bit and the driver is the one mentioned above (AccessDatabaseEngine_x64).  The driver is logged under the ODBC Data source administrator - Microsoft Access Driver (*.mdb, *.accdb) - Version 14.00.6015.1000 - File ACEODBC.DLL.  Hope that helps?
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Something doesn't add up; you sure it's Office 64 bit on that machine?  Your not running under a 32 bit runtime for example?

 The drivers suggested by John should have done the trick if it was 64 bit.

Jim.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Also BTW want to make sure you install the SP1 for that:

http://www.microsoft.com/en-us/download/details.aspx?id=26605

Jim.
0
 
dbn4MeAuthor Commented:
Hello Jim,

I assume the Office is 64 bit as it is located under the c:\Program Files\Microsoft Office\Office14 and not in the c:\Program Files (x86)\ folders! Also checked under the Windows Task manager - not showing "*32"


To answer your second part - yes SP1 has been installed!
0
 
mastooCommented:
If this is a custom .net app I'll mention that we ran into some 64-bit access trouble and got around it by changing our projects to build for 32-bit rather than "any platform".  The "any platform" would JIT as 32-bit on 32-bit windows and 64-bit on 64-bit windows but the difference is inconsequential for the application and got around some compatibility problem.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<I assume the Office is 64 bit as it is located under the c:\Program Files\Microsoft Office\Office14 and not in the c:\Program Files (x86)\ folders! Also checked under the Windows Task manager - not showing "*32">>

 Please check Access iteself; open, then click the file tab and then help down the left side.

Off to the right, you'll then see:

screen shot - version high lighted
 Look at the high lighted area.  Sounds like it's 64 bit, but let's be sure.

Jim.
0
 
dbn4MeAuthor Commented:
Hello Jim,

Thanks I confirm it is 64 bit.
Screen Clip - Version
0
 
dbn4MeAuthor Commented:
I just want to clarify that this is a simple desktop application using ADO to connect to the Access database.  We have the same code running on numerous servers using Access 2000 - 2003 with the Provider being the old Jet 4 Engine.  We did not have issues.  Changing the provider to Microsoft.ACE.OLEDB.12.0 seems to be the problem area!
0
 
dbn4MeAuthor Commented:
Jim this has now confused me! I changed the Provide on the ADO Component back to the JET 4.0 engine, used the MsAccess 32 bit database and the connection succeeded!


Microsoft.Jet.OLEDB.4.0;Data Source= ' + strLocation + '\Data.mdb' + ';Mode=Share Deny None;'

Does this mean that if you are running Office 64 Bit and want to use Access you need to use 32 bit Access and link through JET4.0?
0
 
mastooCommented:
I think that means you have a 32 bit app using 32 bit drivers through 32 bit JET
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<Thanks I confirm it is 64 bit.>>

<<Jim this has now confused me! I changed the Provide on the ADO Component back to the JET 4.0 engine, used the MsAccess 32 bit database and the connection succeeded!
>>

 Got me confused to; the old OLE driver is strictly 32 bits.

Jim.
0
 
dbn4MeAuthor Commented:
Hello Mastoo,

And by default if you are running on a system with Office 64 bit you can't use the drivers installed for Access, namely Microsoft.ACE.OLEDB.12.0 and you can't load the 32 bit version of the same drivers for Microsoft.ACE.OLEDB.12.0!  By default, you have to use the older driver or alternatively a different 32 bit database.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
I'm wondering if your seeing the result of a 32bit install mixed with a 64 bit install; the two can't mix.  You need to be using one or the other.

 When you installed this app, was it an actual install or just moving the DB over and using the Access version already installed on the machine?

Jim.
0
 
dbn4MeAuthor Commented:
In summary then, the question raised up front:

1) Is there a work around for running a 32 bit application on a 64 bit platform which has Office 64 loaded:  - need to use the old JET4.0 Engine linked to Access 200 - 2003 format.
2) Alternatively, you can use a different 32 bit database such as Pervasive, Paradox etc
0
 
dbn4MeAuthor Commented:
Hello Jim,

There is no mix up with the installation - all components and database are 32 bit as we using Delphi2010.  As a general rule we do not install drivers for Access Database installations where Microsoft Office is loaded. The problem we had was with the connection string calling the Microsoft Driver for access ('Provider=Microsoft.ACE.OLEDB.12.0;").   If Office 64 bit is installed on the target machine, you can't install the 32 bit driver for Access. However, if you define the driver as JET4.0 - the system accepts the 32 bit version.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<need to use the old JET4.0 Engine linked to Access 200 - 2003 format.>>

 Yes, but with a 64 bit install of Office, that should not be the case!  It should be using the 64 bit OLEDB drivers to talk to the db.  DB's in of themselves are not 32 or 64 bits; it's the version of Office that you use to access the DB that should determine the drivers that are required.

  Yet if it works it works I guess, so make sure you accept your own comment as answer.

Jim.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Ah the light blub just went on; the new 64 bit OLEDB lib for ACE does not have support for the older MDB formats and the 32 bit driver works because it's being accessed through the WOW services.

 What had me confused is that ODBC does not work like that; 64 bit is 64 bit and 32 is 32.  You can't use 32 bit ODBC drivers with 64 bit Access.  This is a lib and not a driver, so it can run through WOW.

Jim.
0
 
dbn4MeAuthor Commented:
Jim,

Thank you for your patience.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
I un-accepted this as you found your own answer here:

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/Q_27868579.html#a38412623

 Please accept this comment as the answer.

 You can give me an assist on the "light bulb" comment as to why your solution works, but your own comment is what directly answered this.

Thanks,
Jim.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 10
  • 9
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now