日期:2014-05-18  浏览次数:20761 次

c#连接ORACLE出现
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.Data.OleDb.OleDbException: Oracle error occurred, but error message could not be retrieved from Oracle.
  在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
  在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
  在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
  在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  在 System.Data.OleDb.OleDbConnection.Open()
  在 helper.BaseClass.Conn.OracleBase.getread(String M_str_sqlstr)
  在 helper.BaseClass.LoginFunc.login(String username, String userpass)
  在 helper.Main.tab1btnlogin_Click(Object sender, EventArgs e)
  在 System.Windows.Forms.Control.OnClick(EventArgs e)
  在 System.Windows.Forms.Button.OnClick(EventArgs e)
  在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  在 System.Windows.Forms.Control.WndProc(Message& m)
  在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
  在 System.Windows.Forms.Button.WndProc(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

------解决方案--------------------
多半是因为oracle驱动的问题.我朋友些也遇到过类似的问题
没有解决.最后弄的重装
------解决方案--------------------
劝楼主用orale for .net的驱动来连接,不要用oledb的方式.