Hi everybody,
I was debugging an application and I'm getting "The transaction operation cannot be performed because there are pending requests working on this transaction."
I'm wondering what can I do about it - re-start Visual Studio? I was stopping execution, could it be that transaction was not automatically closed?
Or what can be a problem?
Also should the transaction time be as minimal as possible?
Here is the transaction is opened, the first insert command is executed, then the long insert command is constructed in a complex loop using the ID from the first insert, then command is executed and transaction is closed. Is it a correct methodology or it should be adjusted?
Thanks in advance.
Actually, by looking closer to the code I noticed, that it uses BeginExecuteNonQuery() rather than ExecuteNonQuery(). So, how can I commit transaction using this method?
If it's not broken, fix it until it is.
My Blog