I have a front-end designed built in VFP and SQL 2000 for backend. I need to be able to rollback a transaction when user clicks the CANCEL button during processing.
The best way is to write a stored procedure to handle your update. Within the stored procedure, use BEGIN TRANSACTION, ROLLBACK TRANSACTION and COMMIT TRANSACTION commands.
The SP does not have to be elaborate - just a simple wrapper to include those commands.
Will pressing ESC while the transaction is being processed in SQL rollback any updates done?
No. In fact, I didn't read your question carefully enough. Sorry.
The rollback feature I described is only good if an error or interruption occurs on the server. You can't use it to initiate a cancellation from the client.
I suggest you follow up Flutepir's suggestion instead.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.