How to perform rollback from

rollback , from , Villeurbanne, France
  • 12 years ago
    Hi, Please help me to perform rollback insert statement from Thank You
  • 12 years ago
    Hi, I am not 100%, but i think you will need to use something like the transaction capabilities of the datacommands to undo the changes made by an insert statement. Not having used them too much and with a horrid bug in the transaction services for Oracle stopping me from going forward with them, i can't really guide more than point you in their direction. Sorry Si
  • 12 years ago
    You can use TransactionScope in .NET 2.0.... it's really simple: Using ts As New TransactionScope()     ' perform your database stuff here     ' complete the transaction         ' if you don't do this, you'll get the rollbacks you want     ts.Complete() End Using Hope that helps!
  • 12 years ago
    Hi, I have found the way to rollback the sql transaction from is how it is done. ' dim trns as sqlTransaction=myConnection.BeginTransaction dim Cmd as SqlCommand=............'Sql stmt Cmd.Transaction=trns Cmd.ExecuteNonQuery trns.commit Note:Rollback is performed in the catch block

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” - Dennis Ritchie