title: The transaction must be disposed before the connection can be used to execute sql statements
body: <p>I am getting this error </p>
  
  <blockquote>
    <p>The transaction must be disposed before the connection can be used to execute sql statements.</p>
  </blockquote>
  
  <p>i have an Excel file that contains about 6000 rows and I uploaded these file into Data table in typed dataset, then I am trying to apply my business logic on these rows in dt.</p>
  
  <p>The exception throws from the second loop and I have to do two loops; why does this exception occur, and how can I solve it?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>try
  {
      using (TransactionScope scope = SysInfo.BeginTransaction(IsolationLevel.Serializable))
      {
  
          //Here is my Typed dataset
  
          //Method Looping through row in Datatable &amp; Calling DB
  
          //another Method Looping through row in Datatable &amp; Calling DB
  
          scope.Complete();
      }
  }
  catch (Exception ex) { throw ex; }   
  </code></pre>