Home Forums SQL Server 2005 Data Corruption From vb.net how can I rollback transaction which I created deferent Sql Server Stored Procedure RE: From vb.net how can I rollback transaction which I created deferent Sql Server Stored Procedure

  • Personally, I prefer to pass all the data to the stored procedure at once..instead of calling a stored procedure for each record. This will give better performance as well as you can handle the transaction at the database side.

    This topic is discussed in detail here:

    http://www.sqlservercentral.com/articles/Miscellaneous/2908/

    http://www.sqlservercentral.com/articles/Miscellaneous/2909/

    http://www.sqlservercentral.com/articles/Miscellaneous/2911/

    http://www.sqlservercentral.com/articles/Stored+Procedures/2912/

    If you still want to execute stored procedures one by one, you can use the transaction processiong features of ado.net connection. Call connection.beginTransaction() and all the commands that you execute after that will be part of a single transaction. Just google for "ado.net transaction" and there are plenty of resources available.

    for example:

    http://www.c-sharpcorner.com/UploadFile/shrijeetnair/TransactionsNConcurr09052005002744AM/TransactionsNConcurr.aspx

    .