Steve A
asked on
C# Console Application getting 'Oracle.DataAccess.Client.OracleConnection' exception
Hello,
I am getting this Oracle connection exception. The Oracle connection properties are correct, as I can use the same credentials to connect via TOAD or SQLDeveloper.
Is there any other dll's or anything else I need to remove this error?
I am using Visual Studio 2010 C# and Oracle 10g.
Thank You
Error Message Below:
"An unhandled exception of type 'System.TypeInitialization Exception' occurred in ExecuteQueryToXml.exe
Additional information: The type initializer for 'Oracle.DataAccess.Client. OracleConn ection' threw an exception."
I am getting this Oracle connection exception. The Oracle connection properties are correct, as I can use the same credentials to connect via TOAD or SQLDeveloper.
Is there any other dll's or anything else I need to remove this error?
I am using Visual Studio 2010 C# and Oracle 10g.
Thank You
Error Message Below:
"An unhandled exception of type 'System.TypeInitialization
Additional information: The type initializer for 'Oracle.DataAccess.Client.
See if there is anything in the Inner Exception property of that exception. If you got the standard exception window popup, then there is a "View Detail" link on the lower left of that window with which you can inspect the Inner Exception.
ASKER
Thanks for the replies.
It is "bombing" on the line below:
OracleConnection connection = new OracleConnection(connectio nStr);
The messagebox comes up with the title - "Microsoft Visual Studio"
and then the vague error message and then 3 buttons below that are:
"Break", "Continue" and "Ignore". The Ignore button is grayed out.
Sorry, there is no "View Detail" link to access and the vertical scrollbar is
grayed out as well, as if you could or try to see if anymore info is provided.
When I click the Break button, I can see the Inner Exception message then,
from the local variables;
Inner Exception "The provider is not compatible with the version of Oracle client"
It is "bombing" on the line below:
OracleConnection connection = new OracleConnection(connectio
The messagebox comes up with the title - "Microsoft Visual Studio"
and then the vague error message and then 3 buttons below that are:
"Break", "Continue" and "Ignore". The Ignore button is grayed out.
Sorry, there is no "View Detail" link to access and the vertical scrollbar is
grayed out as well, as if you could or try to see if anymore info is provided.
When I click the Break button, I can see the Inner Exception message then,
from the local variables;
Inner Exception "The provider is not compatible with the version of Oracle client"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I went ahead and downloaded this:
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
ODTwithODAC112030.zip
I installed it and then tried running the console app or debugging it and it opened the Oracle connection! So all is good now.
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
ODTwithODAC112030.zip
I installed it and then tried running the console app or debugging it and it opened the Oracle connection! So all is good now.
Unless you have more detailed error messages, it will be difficult to tack this one.