title: XACT_ABORT within TransactionScope for simple error handling
body: <p>This question is an attempt to explore the semantics involved in the interaction between TransactionScope and xact_abort in SQL Server 2000.</p>
  
  <p>If the following sql is executed within a TransactionScope, and the first delete command errors, will the second delete command be run?  (Assume a foreign key from parent to child in order to ensure failure.)</p>
  
  <pre><code>create procedure test
      @id int
  as
  set xact_abort on
  -- no explicit transaction is created
  
  -- if this fails
  delete from dbo.[parentTable]
  where id = @id
  
  -- will this run?
  delete from dbo.[childTable]
  where id = @id
  </code></pre>
  
  <p>Assuming trivial application code as below:</p>
  
  <pre><code>public bool TryTestStoredProcedure()
  {
      try 
      {
          using (TransactionScope t = new TransactionScope())
          {
              MethodThatRunsTestStoredProcedure();
              t.Complete();
              return true;
          }
      }
      catch
      {
          return false;
      }
  }
  </code></pre>
  
  <p>What will be the return value from this method if the first delete statement in the stored procedure fails?  What about if the second delete statement fails?</p>