Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements

  • 24 February 2022
  • 0 replies
  • 925 views

Userlevel 5
Badge +20
 

Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements

kbt146542

PRODUCT
K2 blackpearl 4.7
BASED ON
K2 blackpearl 4.7
SEE ALSO
 
TAGS
Microsoft SQL
Service Broker
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.
LEGACY/ARCHIVED CONTENT
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.

Issue

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."

 

Image

Symptoms

  • 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.

Troubleshooting Steps

To resolve this error, please do the following:
  1. Edit your SQL Server service instance.
  2. Set Suppress Transaction to true.

    Image
     
  3. Update the service instance.
  4. Refresh the SmartObject, and test the SmartObject again. The error should go away.

 

Please read more here for more information on Suppress Transaction.


0 replies

Be the first to reply!

Reply