I have a loop that inserts a record on each iteration. I am checking the err.number value after each insert and writing any errors to a log file. Code as follows:
do while..
strSQL3 = "INSERT INTO....."
adoMaster.Execute strSQL3
If err.number Then
response.write err.Description
end if
loop
However, if one of the inserts fails, then all the remaining inserts will generate an error message (even though they are correctly inserted into the database). Does the 'err.number' variable retain it's values through each iteration? I thought performing an insert would reset these values to 0 or null if the insert was successful.
Thanks.
do while..
strSQL3 = "INSERT INTO....."
adoMaster.Execute strSQL3
If err.number Then
response.write err.Description
end if
loop
However, if one of the inserts fails, then all the remaining inserts will generate an error message (even though they are correctly inserted into the database). Does the 'err.number' variable retain it's values through each iteration? I thought performing an insert would reset these values to 0 or null if the insert was successful.
Thanks.