none
How does DBTransaction.Commit()/Rollback() work? RRS feed

  • Question

  • Hi

    i am learning ado.net, and really curious about how DBTransaction.Commit()/Rollback() work.

    first i tried DBConnection.ChangeDatabase(), from SQL Server Profiler, i can see when i call changeDatabase, it sent t-sql "use databaseName" to the database.

    then when i try DBTransaction.Commit()/Rollback(), i am expecting to see something in the profiler as well, but supprise... i didnot see anything...

    anyone can tell me how the transaction works?

    thanks


    Zhongchen Zhou
    Friday, November 26, 2010 9:10 AM

Answers

  • In that case provider uses database API instead of sending SQL statements. That's why you do not see it in profiler.
    Val Mazur (MVP) http://www.xporttools.net
    • Marked as answer by liurong luo Friday, December 3, 2010 1:48 AM
    Friday, November 26, 2010 11:24 AM
    Moderator