LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL stored procedure parameters with different default values

Hello Everyone,

I am using the example from this knowledgebase topic, http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4.

I followed the instructions on how to edit the default value by creating a constant to variant to constant vi. The problem is when I add the newly created variant constant to the parameters cluster for my create parameterized query vi, it becomes the default value for all parameters. Since my parameters are a mixture of strings, int, boolean and date/time, I don't want all of the parameters to have the same default value. Some of them I need to be NULL. Is there a way to do this or is it best for the default value to just be an empty string?

Thanks for your assistance.

Rick

0 Kudos
Message 1 of 5
(2,738 Views)

Hi rpage,

 

The link on your post is broken!

 

Thanks and have a great day.

0 Kudos
Message 2 of 5
(2,719 Views)

The editor added the period at the end of my sentence to the actual url link.

Here it is again without the period.

http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4

Thanks,

Rick

0 Kudos
Message 3 of 5
(2,715 Views)

Hmmm.  I am a little confused by your question.  But could you build each parameter separately and then append them to an array?

 

Perhaps you could upload some screenshots that demonstrate the problem more clearly?

http://www.medicollector.com
0 Kudos
Message 4 of 5
(2,710 Views)

I know I'm responding to an old topic, but I ran into the same issue and got it working, so I thought I'd share.

 

As alluded to above, you don't have to use the constant you create on the input to the parameterization query VI.  You can just grab the cluster and build an array, leaving you free to modify the default value for individual parameters.

 

db.png

 

Also, remember to follow the directions and get the recordset before trying to get a parameter output.  Even if you won't actually be using the recordset.  That threw me for a little while today.

0 Kudos
Message 5 of 5
(2,483 Views)