Post by m***@gmail.comI've ran into a run-time error:'-2147168237(8004d013)': Only one
transcation can be processed in this moment.
Does anyone have any idea about this error?
Thanks in advance.
Steven Cheng
I have also encountered this error and I'm also using ADO (OLEDB) to connect to SQL Server. What can I do to fix this?
Michelle Relevo
Your code is attempting to perform a "nested transaction". Only a very
few OLEDB Provider will allow (or able to manage multiple transactions
within one session). The Jet 4.0 OLEDB Provider was the only MS one I
know that could, but there may be a 3rd party Provider for SQL Server
out there that will.
Nested Transactions:
https://msdn.microsoft.com/en-us/library/ms716985(v=vs.85).aspx
In otherwords the following basic construct will produce the error ...
Begin Trans
Execute( some statement )
Begin Trans <-- INVALID NESTED TRANSACTION
Execute( another statement )
Commit Trans <-- more errors
Commit Trans
(Warining! psuedocode and air code )
Note: It doesn't have to be so obviously linear code as above, the
transactions may be called from apparently separated code, but the
calls are still part of the same *session*.
So remove the nested Transactions or find another Provider that will
support them.