1. Martin Holodniok
  2. SnapDevelop
  3. Monday, 27 April 2020 14:33 PM UTC

Hi everyone, 

I ran into a problem while trying SnapDevelop. I am trying to create simple REST API.

 

I have a DataStore, which is imported from PB. It uses stored procedure as a data source. That stored procedure takes 5 arguments. 

I can create the DataStore in SnapDevelop, but when I call retrieve with all  5 arguments, I get an exception:

SqlException: Procedure or function 'xxx' expects parameter '@key', which was not supplied.

 

How can I fix that? I don't know any other way how to supply args except as parameters of retrieve.

Thanks in advance! 

Ricardo Jasso Accepted Answer Pending Moderation
  1. Wednesday, 13 May 2020 17:29 PM UTC
  2. SnapDevelop
  3. # 1

It looks more like a workaround. I'd suggest opening a bug report.

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 May 2020 15:51 PM UTC
  2. SnapDevelop
  3. # 2

Thanks for sharing the solution!

Comment
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 28 April 2020 06:39 AM UTC
  2. SnapDevelop
  3. # 3

Hi Martin,

It seems that the parameter value of "@key" was not mapped correctly.

Did you use a string array as a parameter value? If yes, please change it to a List<string>.

If it still doesn't work, could you provide your C# .NET DataStore retrieval code line, its model, and the syntax of this stored procedure?

Regards,

Logan

Comment
  1. Martin Holodniok
  2. Wednesday, 13 May 2020 11:19 AM UTC
Hi Logan,



I have already solved the problem. Problem was, that the generator created the model class with DwSelect attribute eventhough it uses stored procedure as data source. I changed the attribute to DwProcedure and it works fine.



Thanks for your help!

Martin
  1. Helpful
  1. Logan Liu @Appeon
  2. Thursday, 14 May 2020 00:36 AM UTC
Hi Martin,

"The generator created the model class with DwSelect attribute even though it uses stored procedure as data source".

Was the model class generated by an old version SnapDevelop?

If this bug still exists when generating a model class with SnapDevelop 2019 R2, I suggest that you submit a ticket on our support portal (at https://www.appeon.com/standardsupport).

Regards,

Logan
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.