Object reference not set to an instance of an object in SQLFreeHan

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - getting the following error occasionally - does not seem to be tied to
any particular user activity - this and the lack of a stack trace that goes
back into my code leads me to suspect that it is due to garbage collection.
I'm not explicitly doing any disposing and I am using connection pooling. The
..Net data provider is IBM Informix 2.81 - I realise that is not really
anything to do with Microsoft but I wonder if anyone can give me any clues or
guidance - should I be explicitly disposing of classes that open database
connections, should I turn connection pooling off ?

Here's the error

Exception Source: IBM.Data.Informix
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: SQLFreeHandle


---- Stack Trace ----
IBM.Data.Common.Ifx32.SQLFreeHandle(HandleType As Int16, StatementHandle
As IntPtr)
FTelesales.exe: N 00000
IBM.Data.Informix.CMDWrapper.DismissStatement(disposing As Boolean)
FTelesales.exe: N 00827
IBM.Data.Informix.CMDWrapper.Finalize()
FTelesales.exe: N 00028
 
TO see if we could determine what was going on here we tried turning off
connection pooling for the IBM Informix connection - today we got the error
shown below - this on attempting to establish a connection (as you can see).
At least this time we get a stack trace back into our own code, though since
this is in a class that is used throughout the system to open every
connection it doesn't help us that much.

I'm not sure if this is related to the previous problem in any way , but it
seems to indicate that turning connection pooling off is not the answer.

Here's the error

Exception Source: IBM.Data.Informix
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an
object.
Exception Target Site: SQLDriverConnectW


---- Stack Trace ----
IBM.Data.Common.Ifx32.SQLDriverConnectW(hdbc As IntPtr, hwnd As
IntPtr, connectionstring As String, cbConnectionstring As Int16,
connectionstringout As IntPtr, cbConnectionstringoutMax As Int16,
cbConnectionstringout As Int16&, fDriverCompletion As Int16)
FTelesales.exe: N 00000
IBM.Data.Informix.IfxConnPoolManager.Open(connection As
IfxConnection)
FTelesales.exe: N 00832
IBM.Data.Informix.IfxConnection.Open()
FTelesales.exe: N 00181
CDb.dbHelper.GetIFXConnection()
FTelesales.exe: N 00060
CDb.GetCustomerFacade.GetCustomer(customerID As String)
FTelesales.exe: N 00026
FTelesales.TeleSalesForm.TeleSales_Load(sender As Object, e As
EventArgs)
TeleSalesForm.vb: line 3058, col 09, IL 0029
System.Windows.Forms.Form.OnLoad(e As EventArgs)
 
Back
Top