thanks. that helps out alot.
i have another question. i have the following test code:
'-------------------------------beg of
code------------------------------------------------
Function ErrorsFound(mycon) '-----------------beg of function
Dim myError
If mycon.State <> 1 Then
eStr = "something wrong with db"
ErrorsFound = True
ElseIf mycon.Errors.Count > 0 Then
For Each myError in mycon.Errors
If myError.Number <> 0 Then
eStr = eStr & "<P>"& myError.Number & " - " & myError.Description &
"</P>"
ErrorsFound = True
End If
Next
ElseIf err.number <> 0 then
response.Write(Err.Description&"<br><br>")
ErrorsFound = True
Else
ErrorsFound = False
End If
End Function '-----------------end of function
query1 = "insert into players (lastname, firstname, rbi) values
('cruise','beta',44)"
query2 = "insert into players (lastname, firstname, rbi) values
('jee','alison',57)"
query3 = "insert into players (lastname, firstname, rbi) values ('van
hudgeons','vanessa',123)"
query4 = "insert into players (lastname, firstname, rbi) values
('fox','megan',99)"
conn.BeginTrans
conn.execute query1
conn.execute query2
conn.execute query3
conn.execute query4
If ErrorsFound(conn) = False Then
conn.CommitTrans
Response.Write "Committing Transaction...<br>"
Else
conn.RollbackTrans
Response.Write "Rolling back transaction...<br>"
End If
'-------------------------------end of
code------------------------------------------------
for kicks, i changed the name of the table to force an error. i
changed it for the first query, then the second, then the third, and
finally the last. the thing i'm wondering is when i changed the
first, second, and third queries, the ErrorsFound function will enter
the 2nd "elseif," but for the fourth query, the function will enter
the 1st "elseif." why is that?
thanks