Solved

Stored Procedure issue in K2 5.3 version

  • 17 January 2020
  • 4 replies
  • 85 views

Badge +5

Hi,

  Select query inside Stored Procedure returns Execute method in smart object instead of List method. This was working fine in K2 5.2 version, with the select query i was able to get the return property. But  when i am creating the smart object using the same stored procedure in K2 5.3 , I am not getting any return property.

 

Regards,

Kathija

 

icon

Best answer by kathija 4 February 2020, 05:42

View original

4 replies

Good day kathija


 


Please see the following.


Determine SmartObject method 'List' or 'Execute' when SmartObject was created from SQL Store Procedure: https://help.k2.com/support-services/kbt136024.


 


Best,


Sunrise

Badge +5
Hi Sunrise,
Thank you for the Quick reply.
I tried testing 2 of my Stored procedure using
SET FMTONLY ON;
SET FMTONLY OFF;
to check if the stored Procedure is returning schema. Both the Procedure is returning Schema. I have created SMO with return property using the same procedure in 5.2 version.
Kathija, K2 may not be able to understand that your stored procedure is returning an output. If your procedure code contains conditional logic (IF this then SELECT... ELSE SELECT...), it might be better to create a table variable, execute the conditional logic on the table variable, then select everything from the table variable at the end. Hope this helps!
Badge +5
Hi,
I was able to resolve this issue in our DEV server. K2 database was present in different server and K2 service account did not have db_owner permission to access our application database. Once the permission was given i was able to get the stored proc in K2

Reply