Issue Description
After upgrading to K2 4.7, executing a SQL Stored Procedure SmartObject from a linked SQL Server, results in an error.
Error Message
“This SqlTransaction has completed; it is no longer usable”.
Cause
Linked SQL queries do not support nested transactions in the same way that DAC implements transactions.
Resolution
- Ensure you have K2 4.7 installed.
- Download and install the K2 4.7 May 2017 Cumulative Update from K2 Partner and Customer Portal
- Get the K2 4.7 May 2017 Cumulative Update FP1 from Regional Support.
- Install the K2 4.7 May 2017 Cumulative Update FP1 to apply the fix.
Considerations
- This issue is concerned with transactions (Rollback\Commits).
- If you build a new SmartObject, you can specify in the method if it must Continue, Stop or Rollback when an error occurs.
- If you perform an insert with a stored procedure, and an error occurs afterward, you will expect the following behavior given the transaction type:
Continue: The row will be inserted and will move to the next instruction
Stop: The row will be inserted and the rest of the instructions will be aborted
Rollback: The row should not be inserted