Posts: 16
Registered: ‎04-12-2006
Message 1 of 4 (409 Views)
Accepted Solution

MS Access connection for x64 machines

409 Views, 3 Replies
06-21-2012 11:30 AM

Hello, all.  I've run into a problem with my "Jet.oledb.4" connection string not working for x64 machines.  I've done some research and found out a few things, but am still confounded.


The code was written on a x86 XP machine with vb.net 2010 express.  AutoCAD will load the dll just fine on x64 machines.  Everything will work except the connection to the database.  I tried installing the Microsoft Access Database Engine 2010 Redistributable for x64, but couldn't because the MS Office installed is x86!!  Instead I installed the x86 version, but got the same unhandled exception at runtime.


Do I need to have the current x86 MS Office uninstalled and then install the x64 version of MS Office on those machines?  Is it that the code is compiled as x86?  If so, how can I compile to x64?  I didn't see any options in settings, and haven't been able to find any examples.


The thing I really don't understand is that the same connection string ( "Jet.oledb.4") works in an old VBA routine on all machines!!  It's madness!!


Any suggestions are appreciated.




*Expert Elite*
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 4 (404 Views)

Re: MS Access connection for x64 machines

06-21-2012 11:59 AM in reply to: david.sexton

The short answer is you can't. You have to be running office 64 bit and windows 64 bit. if you have the 32 bit office installed you will only be able to use the 32 bit application.


(defun botsbuildbots() (botsbuildbots))
Posts: 16
Registered: ‎04-12-2006
Message 3 of 4 (396 Views)

Re: MS Access connection for x64 machines

06-21-2012 01:44 PM in reply to: arcticad

Sorry, to clarifiy : if I get MS Office 64 bit installed on their machines, I should be able to use the "ACE.oledb.12.0" connection with no problems on those machines?  We only have four people that are going to be using this and knowing who has what machines, I was thinking I could tell it to use "Jet" or "ACE" depending on who is logged in.  Or am I just dreaming?



*Expert Elite*
Posts: 987
Registered: ‎04-27-2009
Message 4 of 4 (393 Views)

Re: MS Access connection for x64 machines

06-21-2012 01:51 PM in reply to: david.sexton

The first, and better choice would use other true database system as data source, istead of MS Access, if you can.


if you have to use MS Access with AutoCAD 64bit, yes, you need to install MS Acccess DB engine 64 bit, not 32bit. If you also use MS Office (most people, who use AutoCAD, do), then the version of MS Office matters.


Usually, MS office installation on 64-bit Windows is actually 32-bit version. With MS Office 2007, you cannot install MS Access DB Engine 64-bit, if the Office 2007 is 32-bit, as you have already found out. You need to remove 32-bit Office 2007. If you have to use Office 2007 then you install 64-bit Office 2007, which may break some of your Office VBA code, if your office apps use any.


However, if you use MS Office 2010 32-bit, you CAN install 64-bit MS Access DB Engine. You need to install the 64-bit DB Engine first, before install 32-bit MS Office 2010.


I'd look into other DB solution, such as SqlExpress, the knowledge and skill you gain from use SQL Express would be more transferrable.


Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.