Home > Net >  Oracle. DataAccess. Client. OracleConnection "of type initializers throw an exception
Oracle. DataAccess. Client. OracleConnection "of type initializers throw an exception

Time:09-24

An error code block
[color=# 800000] [color=# 00 ff00] OracleParameter [] parameterValue={
https://bbs.csdn.net/topics/New OracleParameter (" : POWERUSERNAME ", "VARCHAR2"),
New OracleParameter (" : ""," VARCHAR2 "),
};
[/color] [/color]

What reason is this excuse me, how to avoid

Error message block
{System. TypeInitializationException: " Oracle. DataAccess. Client. OracleParameter "of type initializers cause abnormal, - & gt; Oracle. DataAccess. Client. OracleException: The provider is not compatible with The version of Oracle Client
In Oracle. DataAccess. Client. OracleInit. The Initialize ()
In Oracle. DataAccess. Client. OracleParameter.. Cctor ()
- at the end of the inner exception stack trace -- -- --
In Oracle. DataAccess. Client. OracleParameter.. Ctor (String parameterName, OracleDbType type, Int32 size, String srcColumn)
In SHDCS. DataAccess. LoginAccess. CheckLogin (HttpContextBase context) location D: \ I use/DCS/SHDCS \ SHDCS \ DataAccess \ LoginAccess cs: line number 36}

CodePudding user response:

Deleting items in reference to the previous that oracle11 this DLL,
Find the native orlce10 installed version of oralce. Oracle DataAccess. DLL this dynamic library
Project reference for oneself the machine install 10 versions of this DLL is copied to the project below the bin,
Database connection string such as similar to a Data Source=native database service name; Persist Security Info=True; User ID=username; Password=PWD;
Then the project used in the Oracle. DataAccess. DLL reference place all oracle10 version of the DLL
  •  Tags:  
  • C #
  • Related