Hi, I have a problem with running multiple sql statements using asp.
Basically if there is an error with any of the statements inside the
query a rollback is done. the sql and rollback work fine, But on the
actual asp page no error is detected unless it occurs in the first
statement in the query. heres an example
<%
Sql= " BEGIN TRAN INSERT INTO Users VALUES ('BLAH', 'BLAH') INSERT INTO
TESTING VALUES ('SOMETHING','SOMETHING') IF @@error <> 0 ROLLBACK TRAN
ELSE COMMIT TRAN "
If Err <> 0 Then
Response.Write "error"
Else
Response.Write "<p>Data has been added!<p>"
End If
%>
in that example if theres an error inserting into Testing the page will
display 'Data has been added' even though it hasnt.
Thanx any help is appreciated
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!