.NET

Reply
Contributor
david.sexton
Posts: 18
Registered: ‎04-12-2006
Message 1 of 4 (434 Views)
Accepted Solution

MS Access connection for x64 machines

434 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.

 

Thanks

Dave

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.

 

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 2 of 4 (429 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))
Contributor
david.sexton
Posts: 18
Registered: ‎04-12-2006
Message 3 of 4 (421 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?

 

Thanks

*Expert Elite*
norman.yuan
Posts: 1,021
Registered: ‎04-27-2009
Message 4 of 4 (418 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.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

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