Write to Access from 32 and 64-bit Application

Home Grown Coder

Well-known member
Joined
Nov 16, 2012
Messages
52
Location
Bay Area, CA
Programming Experience
3-5
Background
I am working on a WinForms application which we currently only distribute as 32-bit, but now plan to distribute as both 32 and 64-bit. The application currently has functionality to export data to Microsoft Access using the Microsoft Jet OLEDB provider.

Problem
The only way that I've found that supports both 32 and 64-bit export to Access is using the Microsoft Access Database Engine (ACE). This looks good in theory until I consider that Microsoft recommends using the 32-bit version of Office, which then implies that the 32-bit version of ACE is installed or can only be installed. This then creates an issue with my 64-bit application using the provider to write the Access file (assuming the user has installed my application as 64-bit).

Question

Does anybody have a solution for this or another way to write the *.mdb file? There is a long discussion on a Microsoft forum about this with one suggestion that it's possible to install both the 32 and 64-bit versions of ACE side-by-side by running the install package using the '/passive' argument...has anybody had success with this in a deployed application?

Thanks in advance for any advice!
 
You could also use the Access PIA, which removes the need for ACE, but also forces the target user to have Access installed. Use the PIA to import the data from XML.

It's also fairly trivial to convert XML to Access by the user. Personally I would just export into typed XML and let users worry about Access.
 
Thank you for the suggestion Herman! I'd need to test the PIA option to see how it handles the case of my 64-bit application installed on a machine with 32-bit Office. Also, as you mentioned, this does then require the user to have Access installed, which isn't a current requirement with our 32-bit application.

We have programmatically used the XML import option to read data into Access, so perhaps for our 64-bit application we'll just write the XML file and give instructions on how to open it in Access.

Thanks again for your suggestions!
 

Latest posts

Back
Top