Re: How to stop TransactionScope from starting distributed transaction

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Are you using SQL Server 2000? If so, your transaction will be distributed
and you can't help that.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------




"BF" <BF@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9A5DB05A-BA0F-480D-8E4E-55F6EDC0362F@xxxxxxxxxxxxxxxx
When I use TransactionScope in my code, I got error message saying "cannot
use SAVE TRANSACTION in distributed transaction". This is because I have
SAVE
TRANSACTION in one of my stored procedures.

It looks like TransactionScope automatically starts distributed
transaction
even I only access one SQL server database. Does anybody know how to stop
TransactionScope from starting distributed transactions? In my
application,
it should be only local transactions.

Thanks a lot.



.



Relevant Pages

  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)
  • Re: Windows Completely Locks Up!! FREEZE
    ... failing to start/run the Distributed Transaction Coordinator. ... Error Specifics: ... The Business Contact Manager SQL Server Startup Service service terminated ... The service did not respond to the start or control request in a timely ...
    (microsoft.public.windowsxp.general)
  • Re: Asynchronous Stored Procedure Never Returns - Help?
    ... If you have the Sql Server 2000 or 2005 docs they are thorough and can be ... for Transaction SQL Reference from the drop-down or select a keyword from ... your query in Query Analyzer or Sql Server Management Studio, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Transaction Abort in a trigger SQL 2008, writing to event log
    ... transaction could still be doomed at some point, ... With the current functionality in SQL Server ... you should roll back the transaction in your error handler. ... global cursor in a stored procedure. ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction Abort in a trigger SQL 2008, writing to event log
    ... I have done some stack trace type of error catching in Powerbuilder, ... transaction could still be doomed at some point, ... With the current functionality in SQL Server ... you should roll back the transaction in your error handler. ...
    (microsoft.public.sqlserver.programming)