07-18-2019 02:30 PM
I am able to write 2D arrays to a database. I would like to write the front panel table's row and header information along with the data as well.
Is there a way to do that? I couldn't find any in the examples.
07-19-2019 03:18 AM
@asukumari wrote:
Is there a way to do that?
There are hundreds of ways to do that.
If you can write 2D data to a database, can't you make the row and header data 2D and write it in a similar fashion ?
What database are you using, what DB library are you using? What does your code look like? Is the 2D data concatenated? Sometimes people things it's OK to create a new table for each measurement, is that the case? What does the database look like? And so on, and so on...
07-19-2019 09:23 AM - edited 07-19-2019 09:23 AM
Well I don't store my data in a database but In general here is what I do.
I like state machines so I will have an "Open File" state that does these things
In my "Save Data" state I use the file reference to write the numeric data to the file a line at a time
07-19-2019 10:44 AM
Of course I can write the row and column header as a 2D to the database table. I would like the row-column header along with the data in the test_csv_information column.
Attached VI shows how I upload a sample 2D data to the DB. However, the table (as shown below which is a front panel indicator) has column and row headers, is there anyway I can send the table data along with its column and row headers directly as a 2D array to the database?
Its a Microsoft SQL DB, No I use the same table for every measurement differentiated by the first column : TimeStamp value.
07-19-2019 10:58 AM - edited 07-19-2019 11:07 AM
I don't have LabVIEW installed at the moment (new computer... long story)
Well you can only write one data type at a time.
You are going to have to break this up into several writes.
Or convert everything to a string array to write it all at once.
Frankly I do not like writing all my data in one shot at the end of a program or test. Because if the program crashes or fails for some other reason before the test is completed. I would rather have partial data than no data at all. So I save my data a line at a time as soon as possible after the data is taken