Re: Using SqlTransaction with MSSQL Trans?



Hi,

I believe you will get separate transactions and transaction from the
application will not be able to rollback changes in a database.

--
Val Mazur
Microsoft MVP
http://xport.mvps.org


<yacrumb@xxxxxxxx> wrote in message
news:1141732287.092355.241230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello all,

I got seven sp's that uses transactions:
BEGIN TRAN
...
ROLLBACK TRAN
...
COMMIT


From ado.net I need to execute all of these using transaction:
SqlTransaction tran = conn.BeginTransaction()
...
tran.Commit()
...
tran.Rollback()

Q: will a commit in sp's be rollbacked by ado.net's rollback? i.e. do
ado.net and mssql use the same transactions-counter?



.



Relevant Pages

  • Re: Transaction Errors
    ... I didn't realize that the DBI version was so ... >>I keep getting this error when attempting to utilize a database that has Innodb ... >>Transactions not supported by database at module..... ... >>until the commit is called, of if an error occurs, the rollback is called. ...
    (perl.dbi.users)
  • Problem with Update trigger and transaction
    ... updating the order information and inserting the packer detail rows as we go ... If one items fails we bailout and rollback. ... The problem is when the order update occurs a trigger fires to record the ... to solve the issue is to not use transactions. ...
    (microsoft.public.fox.vfp.dbc)
  • Re: Number of open transactions in DAO
    ... The idea behind transactions is to ensure that all updates across multiple tables in a database can succeed prior to committing them. ... I commit when the user presses the save button (which will also add more info to the records in the recordset) and rollback on the form's OnClose event. ... I need this for cleaning up but calling .Rollback or .CommitTrans when there is no transaction causes a runtime error. ...
    (microsoft.public.access.modulesdaovba)
  • Re: OO programming - illumination?
    ... > Commits and rollbacks are an artifact of a particular storage ... > that the problem solution should not have to understand. ... In distributed transactions, multiple resources can ... > such thing as a rollback. ...
    (comp.object)
  • Re: ADOBD / JET Transaction Problems
    ... I think it's probably more relevant to post the transaction-related code ... > using ADODB to open the database to use record level locking. ... > Rollback, the Rollback does not Rollback the transactions - all 3 are ...
    (microsoft.public.vb.database.dao)