I am getting this error
The transaction must be disposed before the connection can be used to execute sql statements.
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.
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?
Here is my code:
try
{
using (TransactionScope scope = SysInfo.BeginTransaction(IsolationLevel.Serializable))
{
//Here is my Typed dataset
//Method Looping through row in Datatable & Calling DB
//another Method Looping through row in Datatable & Calling DB
scope.Complete();
}
}
catch (Exception ex) { throw ex; }