我正在使用Windows 7 32位机器。现在,当我尝试从.net应用程序连接远程服务器上的oracle时,我得到以下异常。可能是什么问题?早些时候这个应用程序运行正常但在格式化系统后,我得到了这个例外。
请立即帮助。
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Data.Common.UnsafeNativeMethods.OCIEnvCreate(IntPtr& envhpp, MODE mode, IntPtr ctxp, IntPtr malocfp, IntPtr ralocfp, IntPtr mfreefp, UInt32 xtramemsz, IntPtr usrmempp)
at System.Data.OracleClient.TracedNativeMethods.OCIEnvCreate(IntPtr& envhpp, MODE mode)
at System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags)
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at ArvindADMS.Program.UpdateLogRecord(DateTime dt, String attTime, String empNo, String action, String deviceId, Int32 checkinoutid)
答案 0 :(得分:0)
您可能使用错误的提供商。很久以前就讨论了MSDN about same exception
因此,将提供程序更改为OLE DB或使用Microsoft Connector for Oracle by Attunity for SSIS