Last post Dec 09, 2011 09:25 AM by Lannie
Dec 09, 2011 08:24 AM|rudedevil09|LINK
Hi, I'm trying to implement the Oracle Data Provider for .NET (ODP.NET) to connect to the oracle data base. I added a reference of the dll in the project and using the follwoing code.
con = New OracleConnection("User Id=user;Password=passwordr;Data Source=somedatabase)
I'm getting the error..ERROR : The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception
I'm i missing something
Dec 09, 2011 09:25 AM|Lannie|LINK
Yes, what is missing is "More details requiired to help you"
Where is the code running? What version of ODP.NET client are you using?
Where is the Oracle.DataAccess.dll located? and if in the project, is your reference LOCAL?
Where is the database? What version is the database?
Are you running in a 32-bit or 64-bit environment? If 64-bit, is the application set to AUTO or explicit compile for 64-bit?
Is this ASP.NET web project or Windows Forms project, etc.?
What does your connection string look like in the project configuration (web.config, etc.)
Is there more to your test connection code, like con.Close()