When a SQL Service Instance is created in K2 Workspace and the native execution is set to false, and a SmartObject is created and executed, a “Specified cast is not valid” error occurs on the GetList method as a result of the Date/Time datatype set in the database.
|Note: The circumstances described in this article are one scenario under which this issue may, or is known to occur. The description is intended to be specific to the scenario described and does not take into account all possible scenarios or circumstances.|
To reproduce this error:
- Create a SQL Database, and create a table in the new database. (One of the columns needs to be of datatype DateTime).
- In K2 Workspace create a SQL Service Instance.
- Change the native execution to false.
- Using the K2 SmartObject Tester, register a Service Instance.
- Create a SmartObject from that Service Instance.
- Execute the SmartObject and run a List Method.
- The error will occur.
Specified cast is not valid
This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error.