system. invalidoperationexception: sqlconnection does not support parallel transaction processing. For system. data. sqlclient. sqlinternalconnection. beginsqltransaction (isolationlevel ISO, string transactionname) at system. data. sqlclient. sqlconnection. begintransaction (isolationlevel ISO, string transactionname) at system. data. sqlclient. sqlconnection. begintransaction () at ccpos. common. dbconnect. starttransaction () helped her colleagues change bugs this afternoon. Her Code was very inefficient, and the code was too many and chaotic, so she helped her write a new one, some copies can be used. Ten minutes later, I thought it should be OK. I didn't pay attention to using two transactions, and there was no error prompt. After the breakpoint is set, I saw that after the transaction was executed, if the return value is false, you don't need to put the mouse in the variable to see why. After 30 minutes of debugging, Baidu has no choice but to ask the boss, the transaction variable with the mouse cursor is shown as follows:
System. invalidoperationexception: sqlconnection does not support parallel transaction processing. For system. data. sqlclient. sqlinternalconnection. beginsqltransaction (isolationlevel ISO, string transactionname) at system. data. sqlclient. sqlconnection. begintransaction (isolationlevel ISO, string transactionname) at system. data. sqlclient. sqlconnection. begintransaction () at ccpos. common. dbconnect. starttransaction ()
Ah! Parallel transaction processing is not supported because two transactions are opened at the same time.