解決「The type initializer for'Oracle.DataAccess.Client.OracleConnection' threw an exception 」異常

問題:部署在安裝oracle client 11g,運行後出現以下問題:html

*****************Exception Text*************** System.TypeInitializationException: The type initlializer for 'Oracle.DataAccess.Client.OracleConnection at Oracle.DataAccess.Client.OracleConnection..cctor() --- End of inner exception stack trace --- at Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString) ...

從oracle 網站下載  ODAC1120320Xcopy_32bit :windows

http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.htmloracle

Reference: Oracle.DataAccess.dll(ODAC1120320Xcopy_32bit\odp.net4\odp.net\bin\4\Oracle.DataAccess.dll)網站

複製以下dll 到你程序的bin目錄中:spa

  • oci.dll (ODAC1120320Xcopy_32bit\instantclient_11_2\oci.dll)
  • oraociei11.dll (ODAC1120320Xcopy_32bit\instantclient_11_2\oraociei11.dll)
  • OraOps11w.dll (ODAC1120320Xcopy_32bit\odp.net4\bin\OraOps11w.dll)
相關文章
相關標籤/搜索