10-09-2015 06:37 AM
Hello,
I am trying to use TestStand (2012) database step types but with no success so far...
My query looks like this:
"SELECT ffPart.PartNumber FROM ffPackage INNER JOIN ffPart ON ffPackage.CurrPartID = ffPart.ID WHERE ffPackage.SerialNumber = '" + Locals.BoxSerial + "'"
I have put a check mark next to Statement requires Parameters
The next statement is "DataOperation/ Execute- Set parametres and execute" where I do the parameters mapping.
The third statement is "DataOperation/ Close - Close and get Output Parameters" where I am trying to read ffPart.PartNumber.
So far everything fine, but when I am trying to run the sequence I get an error that the output parameter is not set ???
Actually it is an output parameter and value field are greyed out by default.
Can anyone help me?
Thanks in advance,
Cristian
10-12-2015 05:34 PM
Hi,
The "ffPart.PartNumber" was specified in your first screenshot as having a return value rather than an output. This might explain why it isn't being seen as an output parameter.
Also, a little background context on what you're trying to accomplish with this would be helpful.
Hope this helps!
10-13-2015 06:07 AM
Hi,
What is the difference between a "Return value" and an "Output"? In both cases values cannot be set...
Regarding your question, I just want to run a select query with parameters:
"Select param_out from table where param_in = x"
Kind regards,
Cristian
10-14-2015 09:23 AM
In both of those cases, TestStand is expecting to retrieve a value from the database. More specific information can be found here.