The problem is not occuring now and Im not sure what Ive done to solve it.
I was finding it hard to debug because I did not get an option to 'Break'
and step into the code to see where the problem was occuring. After a lot
of trial and error I narrowed it down to a procedure that was being called
every 5 secs (for testing purposes only).
It was failing on the cnn.Open() line after a random number of times ie it
might work fine for 30 times and then fail on the 31st time
I tried wrapping open in a try catch block but the error message still
appeared. Im not on dev machine at moment so I cant bring up the error, but
as I remember it was a JIT debug error if that makes any sense. It didnt
allow be to break & see the line where the error occured
Procedure Code
===================================================================
Function Load(ByVal lngID As Long) As Boolean
Dim booRetVal As Boolean
Dim cnn As Data.OleDb.OleDbConnection
Dim cmm As Data.OleDb.OleDbCommand '.SqlClient.SqlCommand
Dim dr As Data.OleDb.OleDbDataReader
Dim objStaffAction As clsStaffAction
Dim strSQL As String
cmm = New Data.OleDb.OleDbCommand '.SqlClient.SqlCommand
While dr.Read
objStaffAction = New clsStaffAction
booRetVal = objStaffAction.Load(dr)
m_colStaffAction.Add(objStaffAction, "K:" & objStaffAction.ID)
End While
dr.Close()
'Tidy Up
cnn = Nothing
cmm = Nothing
dr = Nothing
objStaffAction = Nothing
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.