Question .NET/PIA/ACCDB Interoperability Problem


New member
Oct 15, 2009
Programming Experience
Greetings All,

I've been searching for a solution to this problem for quite some time. The company I work for has been in the process of migrating vb6 code to .NET for a while now. The vb6 code used Access MDB for its data storage, and when compiled and deployed to client machines, it worked perfect WITHOUT having to have any soft of MS Office product installed on the end user's machine.

So to clarify: VB6 Code + MDB worked fine without requiring clients to install MS Office.

Now on to the problem. As the code has been migrated from vb6 to .Net using VS2005, everything was coded and modified line by line and the structure and original source code are pretty much the same. (aside from syntax obviously). The main difference between the two is that with the advent of Office 2007, the database was upgraded to the new ACCDB format. A reference has been made to the MS Office 12.0 Access Database Engine now when the software is run on a machine without any office installed, I get an unhandled exception, could not load "Microsoft.Office.Interop.Access". If I publish the software and then try and run the setup, I get "Microsoft.Office.Interop.Access Version be installed in the GAC".

I've tried running the MS Office 2007 PIA redistributable, but that requires That MSO2007 be installed first.

So I guess the main question is, how can I make it so that this software can access an accdb, or maybe even return to mdb for that matter, without having MS Office installed on the end user's machine? The source code doesn't use any Office automation, it only read and writes out of the accdb using basic SQL.

Any help would be greatly appreciated. Thanks in advance to all that reply.




Well-known member
Apr 25, 2006
Programming Experience
Sounds like whomever modified your code did it in a broken fashion. There should be no need to install office to access a new ACCDB.

1) you could have kept the MDBs and just used the jet driver
2) your error message references Interop, which is a way of programmatically loading and interacting with a copy of microsoft access itself (the program) so of course you need access installed - if the interop is used for database access, remove it. You may find the interop is used for something else (like showing reports, or utilising other functionality of access) in which case you ahve to have access 2007 installed
3) you can access an ACCDB using - this is NOT the PIA! THe PIA is a bridge to allow your code to programmatically interact with a running copy of an office program; very very different concept to that of isntalling a database driver, and then using the driver to conenct to the database

your app, and access 2007 are both apps that connect to accdb databases, and in this sense they are peers.. Your app seems to have been written to use Access 2007 in some way -> they are now NOT peers.. so access must be installed unless you change the code not to use those access functions
Top Bottom