שתף באמצעות


Could not load file or assembly 'Interop.ADODB, Version=2.8.0.0 on 64 bit windows 7 OS

Question

Monday, October 3, 2011 7:50 AM

Hi All I am facing this problem when running my applciation on 64 bit os.While it is working good on 32 bit OS which is my development environment also.

I do not know how to get rid of it. Target CPU is set as ANY CPU ( there are no other option comming there)

Thanks in advance 

Want to add MVP with my name.

All replies (8)

Monday, October 3, 2011 8:21 AM ✅Answered | 1 vote

Babushek,

If I see this kind of problems I always use Google with this keywords

Paul Adodb 64 7 

Then I get this thread from a fortnight ago.

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6115739d-3a29-4e26-9c31-ba2378ce1807

Success
Cor


Monday, October 3, 2011 2:10 PM ✅Answered

That should be fine. There is no 64-bit version of 2.8 but ADO version 6.0 supports both 32-bit and 64-bit.Paul ~~~~ Microsoft MVP (Visual Basic)


Monday, October 3, 2011 7:57 AM

Hi,

I hope you are trying to create a Access database on 64 bit machine. If so there is no 64 bit driver for creating the option. or else could you explain what you are doing with an example??

Regards,

A.Murugan

If it solved your problem,Please click "Mark As Answer" on that post and "Mark as Helpful". Happy Programming!


Monday, October 3, 2011 8:04 AM

Hello Murugan 

I have a ADODB Recordset which is converted from a system.Data.Datatable and this recordset is used to fill in an MS EXCEL Range.

while I am creating the variable for ADODB.RECORDSET the exception occurs.

 

Thanks for reply

Want to add MVP with my name.


Monday, October 3, 2011 9:03 AM

I always use Google with this keywords

Paul Adodb 64 7

lol
Armin


Monday, October 3, 2011 10:32 AM

Cor sir I think you solved my 90 % problem but not making ur post as answer(for some time) because I have to post my result here and if extra experiment are done.

Thanks 

Want to add MVP with my name.


Monday, October 3, 2011 12:25 PM

Could you post the exception (error) you are encountering when running 64-bit? I can only guess that you are probably using a 32-bit component in your app which will not run under 64-bit.Paul ~~~~ Microsoft MVP (Visual Basic)


Monday, October 3, 2011 1:57 PM

Hi Sir Below is the exception

Could not load file or assembly 'Interop.ADODB, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

 

 

System.BadImageFormatException: Could not load file or assembly 'Interop.ADODB, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

 

 

I have solved the issue by removing the reference of 2.8 version and adding reference of 6.0 version. Till now it is working with 32 and 64 bit W7 OS. Can it create problems in future?

 

Thanks 

Want to add MVP with my name.