10-08-2018 05:13 AM
Hi all,
Can anyone tell me how to pull the data from a `Table` within a `Dataset` in .NET (System.Data(4.0.0.0))
I can see the data is loaded into the dataset but can`t find a method or property to retrieve it.
Thanks.
Solved! Go to Solution.
10-08-2018 06:04 AM
Post what you have. Will save everyone precious minutes...
10-08-2018 07:20 AM - edited 10-08-2018 07:25 AM
Hello wiebe@CARYA,
I`ve attached the VI. Its from Labview 2017 64bit.
Also, I have just had a bit of success. You will see in the code that i've managed to output the data to an xml file, at least I can see the data now...
Just don`t want to save out to file then read back in .....
10-09-2018 03:46 AM
Hello Nick an Wiebe,
Here is example code I am currently working on. It retrieves all information stored in a DataTable that came from an SQL query.
This code is working, however it's work in progress. I am currently installing a new MySQL server to be able to wireshark the connection to verify it is actually doing exactly what I am expecting.
10-09-2018 03:57 AM
Hmm. IIRC, the ADO .NET API returns a DbDataReader object, or at least that's what I'm using. So I don't get (or didn't use) a dataset object. So I can't provide a dataset solution OOTB.
I went through some effort to avoid the conversion to string. I convert to variants, so the binary data stays valid. This is a huge benefit, as it avoids all those problems with quotes in strings, "," or "." and resolution in floats, and formatting of data\time data. Now we have .vims the VIs will eventually get a type input, so the To Variant phase can be skipped, and the data is returned\entered as intended.
10-09-2018 04:09 AM
Hi Ingo,
Looks very promising, I was originally looking at using Datasets and tables to pull the data in a decoupled fashion for my system. I only ever read data for configuration at start of test, this does not change during test, so i`m not too concerned with having a live data stream. At the end of test the results are collated and passed back to the database in one write.
I will also try to use the dataset in my application. Its going to be interesting to update the dataset if required.
Cheers,
Nick