I have a .NET winforms
application which uses ODP
for connection to oracle db. ODP installation is 32 bit i'm developing the aplication on a Win 7 64 bit machine
. I'm setting the platform target as x86 on the development machine and it runs ok. But when i tested the application on Win Server 2003 64 bit machine
it gave the exception
The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception.
UNHANDLED EXCEPTION STACK TRACE:at Oracle.DataAccess.Client.OracleCommand.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
UNHANDLED EXCEPTION SOURCE: Oracle.DataAccess
UNHANDLED EXCEPTION INNER EXCEPTION: Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleCommand..cctor()
UNHANDLED EXCEPTION DATA: System.Collections.ListDictionaryInternal
UNHANDLED EXCEPTION MESSAGE: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception.
And when i set the platform target to Any CPU
on Windows 7 64 bit it gives the exception:
Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
ODP version on development machine(Win 7 64 bit) is 11.2.0
and on the test machine(Win Server 2003 64 bit) is also 11.2.0
What should i do to run the application on both machines? Any idea?
IMO There are a few options:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.