C
Colin Steadman
While scouting around this group, I've stumbled upon this ASP script
which deals with rolling back transactions -
'-- Error Handler
if oConn.Errors.Count > 0 then
oConn.RollbackTrans
Response.Write("FAIL")
Response.End
Response.write(err.description)
end if
Which has given me pause to wonder if what I am doing is correct. I'm
basing my rollback on the err.number not being 0 (sample code below).
Is this ok, or should I be using the conn.errors.count property
instead?
TIA,
Colin
If Not UpdateDealerPeopleInfoPending Then
conn.RollbackTrans
response.redirect("msg_employment_status_update.asp?error=2")
End If
Function UpdateDealerActionsSummited()
On Error Resume Next
sql = "random sql update statement"
conn.execute sql, , &H00000080
Set sql = Nothing
'Errors?
If err.number <> 0 Then
UpdateDealerActionsSummited = False
Else
UpdateDealerActionsSummited = True
End If
End Function
which deals with rolling back transactions -
'-- Error Handler
if oConn.Errors.Count > 0 then
oConn.RollbackTrans
Response.Write("FAIL")
Response.End
Response.write(err.description)
end if
Which has given me pause to wonder if what I am doing is correct. I'm
basing my rollback on the err.number not being 0 (sample code below).
Is this ok, or should I be using the conn.errors.count property
instead?
TIA,
Colin
If Not UpdateDealerPeopleInfoPending Then
conn.RollbackTrans
response.redirect("msg_employment_status_update.asp?error=2")
End If
Function UpdateDealerActionsSummited()
On Error Resume Next
sql = "random sql update statement"
conn.execute sql, , &H00000080
Set sql = Nothing
'Errors?
If err.number <> 0 Then
UpdateDealerActionsSummited = False
Else
UpdateDealerActionsSummited = True
End If
End Function