Oracle ODBC Error

I have a .net application that I was asked to change, it uses .net framework 2.0

I installed the ODBC DSN with connection information for our Oracle database on my local machine, tested the connection, and it works fine.

Now I launched my application, it went without problems and ended, I checked our error log and found a couple of errors not related to this problem, but this error did not appear.

So, I ran the app again with break points to get to these errors. This time it crashed with an error below

ERROR [IM004] [Microsoft] [ODBC Driver Manager] SQLAllocHandle driver by SQL_HANDLE_ENV error

Now what turns me on is that it just works fine even 10 minutes ago, and I only added a breakpoint.

I found several answers and gave them my best.

  • I installed Read / Execute in the oracle driver folder and not reset the permissions, and that didn't matter.
  • I checked the environment variable "Path" and fine [/ li>
  • Using the ODBC administrator, I tested the connection without errors.
  • Checked that the connection string pointing to the DSN is still correct. 5. List item
  • It is confirmed that my application is configured to run the 32-bit version, as the driver is 32 bit.

The only thing I did not do was save, shut down the reboot computer and try again. What will I do immediately after this message, if it works, I will publish it.

In any case, if anyone knows what might cause this behavior, I would be very grateful to you.

Computer - Win7, .net FrameWork - 2.0, this is VB.net, Oracle Driver 10g (10.2)

Update: well, I used the ODBC admin to remove the DSN and rebuild it. I launched the application and worked.

I came back later today after some changes and restarted the application and again got an error. I tried to restore the DSN, and it did not help, I tried to restart, and it did not help.

The stack trace is shown below.

StackTrace: at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions) at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.Odbc.OdbcConnection.Open() 
+7
source share
1 answer

Is this running on the remote desktop? If so, you may need to add Create Global Objects for Remote Desktop Users to your local policy.

If you are on a local desktop, check the version of the ODBC driver you are using. If it's older than 11.2.xx, you should probably install the new ODBC driver from Oracle (don't use the Microsoft Oracle ODBC driver - it has problems).

0
source

All Articles