This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
When executing a SmartObject method that in turn executes an SQL Stored Procedure, the SmartObject returns the following error:
"Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0."
- This error only occurs after applying 4.7 November 2017 CU, or any CUs that were released after November 2017.
- On 4.7 without any CU and FP applied, you may get an SQL transaction has completed; it is no longer usable error.
- Stored procedure has nested transactions.
- Stored procedure contains RAISERROR. Removing the RAISERROR in the stored procedure allows the SmartObject to be executed without any errors.
To resolve this error, please do the following:
- Edit your SQL Server service instance.
- Set Suppress Transaction to true.
- Update the service instance.
- Refresh the SmartObject, and test the SmartObject again. The error should go away.
Please read more here for more information on Suppress Transaction.