Required Stored Procedure Parameter

  • 15 March 2012
  • 8 replies
  • 19 views

Badge

Hi,


I started using K2 recently. I'm pretty sure someone stumbled upon this issue before. A process has to update a record in a SQL Server DB. It reads the record in to process data fields, updates a data field and executes an update SP using the same set of data fields. When update SP is executed the following error occurres: SmartObject property is a required property Comment for selected method Update. Value must be set. The record has Comment field as NULL. Both Read and Update use same Comment data field. What can be wrong?


8 replies

Badge +10

When do you get this message?  Can you attach a screenshot?


If you execute directly from the smartobject do you still get the same error? (try the smartobject tester)

Badge +10

I would check that the comment field that the stored procedure inserts to is not null as well. Also try @Comment = Null for the stored procedure parameter. It seems to work for me, Im an using blackpearl 4.6.6.

 

Hope this helps

Badge +7

Hi,


 


Have you tried to test your smartobject using the smartobject tester to evaluate if your methods function properly?


 


Regards


Nelly

Badge

I'm having pretty much the same problem...

 

Blackpearl 4.6.7

SQL Server 2012

 

I created a stored procedure to handle create  with most of the parameters optional,

but when I create a smart object or even before that, just browse the stored procedure in Smart object tester, it shows that all parameters are required.

 

any ideas what I'm missing?

 

See pictures.


12547i51B82B3A8FFD9F88.jpg
11599i3DE0D7C872E23ACF.jpg
Badge +8

Set your value to scnull (just type this in the value field). 

 

It's not really documented, but this seems to be a reserved word of some sort in K2 to assign NULL values.

 

At least it does for us. :)

Badge +7

All of my stored procedures use NULL and I don't see any flagged with required.  Unless it's a 2012 thing...I'm using 2008.

 

If you right click on your database service instance and go to edit instance, what are the fields set to?   This is what mine is set to:

12699iA92DDF948BBD9E96.png

Badge

thanks, that did the trick!

 

mine was set to true for the use parameters for stored procedures.

 

Didn't even notice that!

 

Badge +2

Is there a similar solution for the same problem in an Oracle database?

Reply