1

I am using a SqlTransaction in my code. In my previous post I was having issue when one connection is having transaction lock with IsolationLevel.ReadUncommited then how do I create another connection without lock. (How do create the transaction for particular connection only in sql?). Now, I got my answer and Donal has suggested me to use myConnection.BeginTransaction(IsolationLevel.ReadUncommitted).Commit();

Now, I am getting issue in above line sometimes.

New transaction is not allowed because there are other threads running in the session.

I don't know what would be the issue here. This issue comes only when another thread is running. I am also using same connection in different thread.

The above error also happens whenever I try to execute any query or trying to fill DataTable using DataAdapter.

I can't figure it out what could be the issue here?

Community
  • 1
  • 1
Shell
  • 6,818
  • 11
  • 39
  • 70

0 Answers0