none
Visual Basic and SQL Server Commit Transaction

Answers

All replies

  • Is it really that hard to look for documentation? ;)

    http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx

    --
    Andrew

    Friday, February 08, 2013 9:20 AM
  • Andrew I am new at this so bare with me.  It seams the link you send is speaking about scope when a user is connected to two databases.  I need to know how to commit a SQL Server transaction in VB after I do a SQL delete.  Please send code.  This is my problem.  I am using VB listvew and I delete an entry on the screen and my code then delete the entry from Sqlserver.  Without getting out of the listview I delete the second entry.   Then when I do a select only the last delete took place in the sqlserver.

    ecb

    Friday, February 08, 2013 10:25 AM
  • Ed,

    If you don't use a .Net transaction or the Entity framework (and the way you write it I guess you don't and are you using the word transaction like a command) there is no commit. Not in SQL server and not in .Net.

    After an command, the command is processed by SQL Server.

      


    Success
    Cor

    Friday, February 08, 2013 12:26 PM
  • Are you talking about transactions set through the SqlCLient.SqlConnection class?  If so this link has an example of the pattern for beginning, committing and rolling back a transaction.  http://msdn.microsoft.com/en-us/library/86773566.aspx


    Blog: http://codemidden.wordpress.com

    Friday, February 08, 2013 5:01 PM
  • Thanks, that is the info I needed.   I think you very much

    ecb

    Friday, February 08, 2013 10:09 PM