DO WHILE TXNLEVEL() > 0 ROLLBACK ENDDOIt seems like a good idea to me. I had been getting errors following other errors that said "command cannot be used within a transaction" or something. Can anyone see a problem with what I have? There's a lot I don't know about proper error handling.