-2

i have two exe files sent by another team member. It is built using c# kode. One oracledataaccess dll file was also sent. (since the exe connects with oracle )-

When i try to execute the 32 bit ,

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.

when i try to execute 64 bit, i get

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

this is driving me nuts. i have installed oracle odac and oracle client. Any thoughts ? i have zero knowledge in dotnet. my system is windows 64 bits.

Parameswar
  • 1,951
  • 9
  • 34
  • 57
  • 1
    As we don't know anything about the exe files and what they are supposed to be doing, it is impossible to troubleshoot what is going wrong here. Can you ask your team member who built these exe files? – Martin Schapendonk Dec 15 '21 at 10:40
  • Sounds like your 32-bit version is finding the libraries it needs, but has a bug. (Or lack of error checking / reporting after trying to open files or db connections). And the 64-bit version is probably only finding a 32-bit DLL version of something, and complaining about it before reaching your buggy code. That's all we can tell you with this minimal amount of details (assuming I'm guessing right), without a [mcve]. – Peter Cordes Dec 15 '21 at 11:07
  • sorry for the late response. the creator if the exe just compiled the file in his machine. and sent me the dll files.. – Parameswar Dec 17 '21 at 12:41

1 Answers1

0

hard to trouble shoot based on this info but with ODP you'll likely need to have your tnsnames.ora file in (for e.g 12.2) C:\oracle\product\12.2.0\client_1\Network\Admin , C:\oracle\product\12.2.0\client_1\bin , C:\oracle\product\12.2.0\client_1\odp.net\bin\4 . Add it there and restart and I hope you'll have some luck. cheers, Dave

MrTea
  • 96
  • 1
  • 2
  • 9