954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

the type initializer for Oracle.DataAccess.Client.OracleConnection threw an exception

I have created a application which connection to sql server database as well as oracle database
The application is working fine at my end
And to connect to oracle i used following namespace
using Oracle.DataAccess;
using Oracle.DataAccess.Client;
But when i run the application on user end
It gives following exception
the type initializer for Oracle.DataAccess.Client.OracleConnection threw an exception
And I am giving only exe, config file

Arjun_Sarankulu
Junior Poster
158 posts since Jan 2011
Reputation Points: 7
Solved Threads: 1
 

Are the Oracle assemblies installed on the client's machine?

nmaillet
Posting Whiz in Training
236 posts since Aug 2008
Reputation Points: 69
Solved Threads: 53
 

I have developed the application on remote desktop there its working fine
How to install Oracle assemblies on client machine

Arjun_Sarankulu
Junior Poster
158 posts since Jan 2011
Reputation Points: 7
Solved Threads: 1
 

Type initializers can fail for a number of reasons. The exception being thrown should have an InnerException with more detail as to why initialization failed.

sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
 

Hello,

This error is occuring because of assembly type mismatch. Try updating the assembly version which you have when/where your program is working fine.

rohitosu
Newbie Poster
1 post since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You