Installed is only Oracle Database 64bit (12.1.0)
All is fine, my program (App1) (compiled as "Any CPU") runs and can connect (gui and as a windows service) to any Oracle database. Program and windows service run as 64bit.
Because of an other program (App2), i installed Oracle Client 32bit (12.1.0). This program runs, all fine (32bit).
App1 runs also good, if i connect to Oracle over the gui (still 64bit).
But if i run the windows service on App1, it occurs this exception
Attempt to load Oracle client libraries threw BadImageFormatException. This >problem will occur when running in 64 bit mode with the 32 bit Oracle client >components installed. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
I don't understand why this exception occurs! Has anyone an idea?
I tried this here, without success: Installing Oracle 32-bit Client on Windows Server Already Running 64-bit Oracle Database Server
On an other machine, i installed the Oracle client first, and then the database. Surprisingly, no exception if i run the windows service!
Is anywhere defined (a path, or what ever) which oracle version a windows service has to use?
At the moment, it's not an option to implement an oracle dll in my apps.
PATH values:
C:\Users\test>dir /al %windir%\System32
Verzeichnis von C:\Windows\System32
20.06.2017 13:04 <SYMLINKD> ora121 [C:\oracle\product\12.1.0\dbhome_1]
0 Datei(en), 0 Bytes
1 Verzeichnis(se), 505'220'648'960 Bytes frei
C:\Users\test>dir /al %windir%\SysWOW64
Verzeichnis von C:\Windows\SysWOW64
20.06.2017 13:04 <SYMLINKD> ora121 [C:\oracle\product\12.1.0\client_1]
0 Datei(en), 0 Bytes
1 Verzeichnis(se), 505'220'648'960 Bytes frei