. Net – ODBC Oracle error
I have one Net application. I was asked to modify it and use it net framework 2.0
I have set up an ODBC DSN on my local computer, which contains the connection details of our Oracle dB. After testing the connection, it works normally
Now I have run my application, it has no problem and is completed. I checked our error log and found some errors unrelated to this problem, but this error is not displayed
Therefore, I use breakpoints to run the application again to get these errors This time it crashed due to the following errors
Now let me know that it worked well even 10 minutes ago. I only added a breakpoint
I found some answers and gave them a chance
>I set the read / execute on the Oracle driver folder to off instead of on to reset the permissions. It doesn't make any difference > I checked the "path" environment variable, and it's good > using ODBC manager, I tested the connection without errors. > Verified that the connection string to the DSN is still correct 5 List items > verified that my application is set to run 32 bit because the driver is 32 bit
The only thing I didn't do was save, shut down, restart the computer and try again I will do it immediately after this article. If it works, I will publish it
Anyway, if anyone knew what might lead to this behavior, I would thank you very much
The computer is win7 Net framework is 2.0, which is VB Net, Oracle driver is 10g (10.2)
Update: OK, I use ODBC administrator to delete DSN and rebuild it I run my application and it works
I didn't change after coming back later today and rerunning the application and receiving the error again Trying to rebuild DSN didn't help, I tried to restart it didn't help
Here is the stack trace
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()
Solution
Are you running on remote desktop? If so, you may have to add "create global object" to the local policy for remote desktop users
If you are on your local desktop, please check the version of ODBC driver you are running If it's better than 11.2 x. X is older, you should install the updated ODBC driver from Oracle (do not use the Microsoft Oracle ODBC driver - it has a problem)