0

I'm working on an application using c# that needs to connect to a database to get the information of excel file that I have.

The problem is that until i did a registry clean, I always get the follow error:

System.InvalidOperationException : The .Net Framework Data Providers require Microsoft Data Access Components(MDAC). Please install Microsoft Data Access Components(MDAC) version 2.6 or later. ----> System.Runtime.InteropServices.COMException : Retrieving the COM class factory for component with CLSID {2206CDB2-19C1-11D1-89E0-00C04FD7A829} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

I dont know if the registry clean was, but its the only thing that could do anything. Im using windows 7 and i read that it already includes in the core the component and i cant reinstall it.

What can i do? Seems that any of the solutions that i'm finding isn't working.

Thanks!

FrioneL
  • 943
  • 2
  • 13
  • 19

2 Answers2

0

Have you tried compiling your application to the x86 platform?

WEFX
  • 8,298
  • 8
  • 66
  • 102
Shoham
  • 7,014
  • 8
  • 40
  • 40
0

Maybe you have an incompatibility issue (see this KB), here is an extract from Wikipedia: Windows 7 SP1 has broken backwards compatibility of MDAC 2.8. Software compiled on Windows 7 SP1 that relies on MDAC ADO will not work on Windows versions prior to Windows 7 SP1 (including Windows 7 RTM, Vista, XP).[62] Microsoft has provided solutions to work around this issue for some applications but VBA applications remain affected.[63]

Evren Kuzucuoglu
  • 3,781
  • 28
  • 51
  • I dont think that will be that incompatibility. The symptomps arent like my error... I get a message problem with MDAC. And i know that w7 use another component (an upgrade of mdac), so... is not a problem with my code and w7, because two days ago, it worked – FrioneL Aug 01 '11 at 11:21