Reputation: 23
I have a VB.NET application that uses a .accdb access file (2010 version) as a backend. The application only reads from this DB file, no writing ever. The application and database file need to be deployed together on the user's PC.
I understand that users will need either: 1) Full version of Access installed already or 2) The runtime installed
in order for the application to run.
That's fine and dandy but my problem is that the AccessRuntime.exe is HUGE (175 MB) and I would rather not deploy it with my app if I don't have to. Is there a way to just deploy the needed Runtime DLLs/files with my VB app and DB file? If so, what/where are these files located?
Upvotes: 2
Views: 3647
Reputation: 123799
If your .NET application will just be reading the Access database file via System.Data.OleDb
or System.Data.Odbc
then you don't need the Microsoft Access Runtime. You just need to have an Access database engine installed, either
Since your database apparently does not need any specific Access 2010 features you can just convert your .accdb file to an .mdb file and use the "Jet" database engine that is already installed on all Windows machines. However, Jet is only available to 32-bit applications so you need to go into your VB.NET project and target it to the x86 platform so it will always run as a 32-bit application (even on 64-bit machines).
If you want to manipulate an .accdb database file then you need to ensure that the Access Database Engine ("ACE") is installed on each machine. The installer is available for download here:
Microsoft Access Database Engine 2010 Redistributable
Notes:
There are both 32- and 64-bit versions of the ACE database engine. The installed version must match the "bitness" of your application (32-bit or 64-bit). This can be tricky, because Microsoft has designed the ACE installers so that you can have either the 32-bit or the 64-bit version installed. (There is a workaround that can force-install both, but it is not recommended because it can break Microsoft Office.)
Further to point #1, so even if you target your .NET app to the x86 platform and require the 32-bit version of ACE you can still have difficulties dealing with target machines that already have the 64-bit version of Office installed. They cannot install the 32-bit version of ACE because the 64-bit version is already installed. So, to use your app they would have to uninstall the 64-bit version of Office and install the 32-bit version.
As far as I know there is no practical way to include the ACE installer in the setup program for your application. Your users would need to download and install the appropriate version (from the link above) for themselves.
Upvotes: 1