LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DB Tool Fetch RecordSet Data Bug?

No idea why it would fix it, Seems that whether to interpret as floating point or integer is dependent on the first value read. This is not how a query from an actual database works.

0 Kudos
Message 11 of 14
(654 Views)

Hi Yik, 

 

I have tried using other functions to read your file (ie. "Read from file" example in LabVIEW. You can get to this by going to Help-> Find Examples-> Browse-> Fundamentals-> File Input and Output-> Read from text File.Vi). This seems to have no problem reading the data from your cvs file as it is. In your program, I have tried changing the data type as well as converting it to numeric data but with little success. Again, I will continue to look through it but it does not seem to be a factor of it not understanding the type of data it is reading from the excel file because the result is the same even when dictating different data types. This is definitely mysterious.


Regards,

Jackie 

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 12 of 14
(642 Views)

 


This seems to have no problem reading the data from your cvs file as it is. In your program, I have tried changing the data type as well as converting it to numeric data but with little success. 


I monitored the block diagram of "Fetch Recordset Data (R).vi and it seems to be doing the rounding. The GetRows invoke method (or something right before it) is making an assumption on how to do the rounding. Changing the data type on the 2-D array of variants won't change what this VI fetched. Changing the first record to have a 1.0 instead of 1 in this column does seem to "fix" it... But this probably is because of some assumption on how to do the rounding when fetching the data from this csv file. 

 

0 Kudos
Message 13 of 14
(632 Views)

Hi Jyang, 

 

Were you able to try this again? Please post the results. 

 

Thank you, 

Jackie 

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 14 of 14
(612 Views)