10-25-2021 06:54 AM
I am currently facing an issue where my code is returning an incomplete result from the executed SELECT statement.
Only the first and last column is successfully returned while the columns inbetween are empty.
When trying out the SELECT Statement in SQL Server Management Studio I get the complete data.
The Labview results on the other hand are imcomplete.
I was able to resolve this issue by changing the Cursor type at the "Execute Query" node to "dynamic". However, doing so resulted in a significant drop in performance which is why a new solution is needed.
Solved! Go to Solution.
10-25-2021 07:01 AM
What's the data format of these columns?
Perhaps they are defined a unicode strings, don't know how LabVIEW handles these.
Regards, Jens
10-25-2021 07:05 AM
Are all columns the same data type? Was your SQL query just "SELECT * from [table]" ?
You could try using "DB Tools Select Data.vi" as well. As a workaround and a troubleshooting step too.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
10-25-2021 07:17 AM
Except for the first column all columns have varchar as their datatype
10-25-2021 12:20 PM - edited 10-25-2021 12:20 PM
@Tuluc wrote:
Except for the first column all columns have varchar as their datatype
Did you use varchar<max>? Oddly enough it does not work with LabVIEW. At least in my case I get a bunch of spaces, the number of them equal to the number of characters in each varchar<max> record.
What do you get if you use Select Data.vi instead?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
10-27-2021 01:19 AM
Did you use varchar<max>? Oddly enough it does not work with LabVIEW. At least in my case I get a bunch of spaces, the number of them equal to the number of characters in each varchar<max> record.
What do you get if you use Select Data.vi instead?
Yes, this seems to have been the problem. After limiting the datatypes the code now returns all results.
Thanks a lot!