NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Fetch Results from SQL Query

Hello All,

 

I'm having trouble fetching results from a SQL query I run in TestStand using "Open SQL Statement".  The number of records returned is always -1.  The funny thing is that I can run the same exact query in SQL management studio and always get one record back.

 

I'm at a loss here.  I have attached the query, any help would be greatly appreciated.

 

Thank you,

Aaron

0 Kudos
Message 1 of 3
(1,726 Views)

So I rewrote the query again another way and still got a -1 back for number of records from "Open SQL Connection".  Then, I realized that both queries used SQL variables.  After removing the SQL variables, "Open SQL Connection" returns the correct number of records.  

 

Can anyone explain why this is? 

 

 

Aaron

0 Kudos
Message 2 of 3
(1,663 Views)

What do you mean by "SQL variables"?

My first response would be that TestStand does not operate with SQL variables, but since i do not really understand your question i may be wrong.

0 Kudos
Message 3 of 3
(1,622 Views)