Hi,
I have the cn.RollBackTrans in the ErrHandler area of my VB Code.
The issue here is sometimes, even before the program encounters the
command, there is a possibility of an error; And hence, it skips immediately to the
command and I guess I am getting an error that begins like this
Object or With Block.....
The following is the error handling part I am using in my code:
How to avoid the cn.RollbackTrans, if we haven't had cn.BeginTrans executed ?? WHat will happen if I simply don't give cn.RollBackTrans here in the error handler part ?
Thank you very much.
RR
I have the cn.RollBackTrans in the ErrHandler area of my VB Code.
The issue here is sometimes, even before the program encounters the
Code:
cn.BeginTrans
Code:
cn.RollBackTrans
Object or With Block.....
The following is the error handling part I am using in my code:
Code:
ERRMAIN:
If Err.Number = 62 Then
Call ErrHandler("Empty Text File Present." & Chr(13) & "Please Copy the Proper Text File")
Exit Sub
Else
Call ErrHandler(CStr(Now) & "-" & Err.Source & "-" & Err.Description & "-" & Err.Number)
End If
cn.RollbackTrans
cn.Close
Set cn = Nothing
Exit Sub
End Sub
How to avoid the cn.RollbackTrans, if we haven't had cn.BeginTrans executed ?? WHat will happen if I simply don't give cn.RollBackTrans here in the error handler part ?
Thank you very much.
RR