As my machine was re-built from scratch I tought it is going to be easy just to use ODP.NET, but I have run into many issues starting from what is the right clinet version I should use (32 or 64). Finally my installation looks ok (64) but I started a new .Net application and got the following error:
"Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. "
Does anybody know whay is going on? Thanks.
This issue is caused by one of the following:
.NET Application is executing as a 64-bit process and attempted to load the 32-bit unmanaged files that are part of ODP
- or -
.NET Application is executing as a 32-bit process and attempted to load the 64-bit unmanaged files that are part of ODP
I have seen the first much more often than the second though either is certainly possible.
An easy way for the first to occur is by compiling the application as "Any CPU" and running on 64-bit Windows with only the 32-bit provider support files available.
If the above does not help get you on the right track, let us know more about your environment/setup so we can try to help.