1
votes

I have an application which connect to access 2003. I'm facing a problem with insert bulk of rows to access, so i came to an solution by using DAO (Microsoft.Office.interop.access.dao.dll) to improve performance of this process as follow this link Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154

But when i open the connect to access by using

using DAO =Microsoft.Office.interop.access.dao.dll; ....

new DAO.DBEngine();

this line gave me an error:

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {CD7791B9-43FD-42C5-AE42-8DD2811F0419} failed due to the following error: 80040154

My application is 32 bit and i running the program in a machine with Win xp 32 bit too, It work fine until i start using DAO

I have try many thing that i came up when google, but nothing help, like this: Error in create access database?

-- More info: After install

AccessDatabaseEngine.exe the problem go away, so i think it must be something like the dll can't register, and then after install the package, somehow it's registered DAO dll.

But i can't not install anything in production server, so i need a way to manual register the dll, or something like that, to let the application work without install AccessDatabaseEngine.exe package

Please give me any advice

1

1 Answers

0
votes

WORKAROUND:

The possible workaround is modify your project's platform from 'Any CPU' to 'X86' (in Project's Properties, Build/Platform's Target)

ROOTCAUSE

The VSS Interop is a managed assembly using 32-bit Framework and the dll contains a 32-bit COM object. If you run this COM dll in 64 bit environment, you will get the error message.