OracleClient System.NullReferenceException: Object reference not set to an
406162Oct 10 2003 — edited Aug 26 2004Hi Group,
I have an ASPX application that is using the System.Data.OracleClient
libraries. Everything works fine, and the speed is pretty good. Here is the strange part. Every now and then I am getting an "System.NullReferenceException: Object reference not set to an instance of an object" exception. I have put debug code throughout the project to try and track it down. Here is what I know.
1) It can occur on an ExecuteScalar, an ExecuteReader or Fill call.
For example:
daVendor.Fill(dsVendor)
Dim rdrVendorCODA As OracleDataReader =
cmdVendorCODA.ExecuteReader
2) This code works fine 99% of the time. In fact, if the user refreshes the screen, the exception doesn't occur.
3) I have written all the SQL statements to a log for testing. All the statements return valid data, even when the exception occurs.
4) There seem to be no pattern as to when it happens. Some of the users have been on the system for a while, others have just logged in.
5) I have verified that the connection is open.
Has anyone else had anything like this?
Thanks,
Jeff