Unspecified Error

  • Thread starter Thread starter Terry Holland
  • Start date Start date
T

Terry Holland

Im getting and Unspecified Error in my VB.Net app and am not sure how to
debug it.

Any pointers

tia

Terry Holland
 
Terry,

Your report seems to me very Unspecified, why can you not debug it?

Cor
 
Terry Holland said:
Im getting and Unspecified Error in my VB.Net app and am
not sure how to debug it.

Where and when does this error occur?
 
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

strSQL = "SELECT tlkStaff_Actions.* " & _
"FROM tlkStaff_Actions LEFT JOIN tlkStaffAction_Vote " & _
"ON tlkStaff_Actions.stac_lng_id =
tlkStaffAction_Vote.stav_stac_lng_id " & _
"WHERE tlkStaffAction_Vote.stav_stac_lng_id Is Null " & _
"and stac_staf_lng_id_to = " & g_objStaffCurrentUser.ID

cnn.ConnectionString = CNN_CONNECT


cnn.Open()
cmm.Connection = g_cnn ' cnn
cmm.CommandType = CommandType.Text
cmm.CommandText = strSQL
dr = cmm.ExecuteReader

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

Load = booRetVal

End Function
 

Ask a Question

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.

Ask a Question

Back
Top