04-27-2011 11:34 PM
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.
04-28-2011 09:53 PM
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
04-29-2011 09:34 AM
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.
05-02-2011 06:22 PM
Hi Jyang,
Were you able to try this again? Please post the results.
Thank you,
Jackie