LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot enter correct values in the SQL server express 2012 using labview

Hi everyone,

 

I am trying to enter the 2D array I get from DAQ into the SQL server express 2012 using Labview. When I am run the software, it connects with the table but doesn't enter the correct values. It only enters the "0" for each column of the table. I have attached the VI as well as the screenshot from the database server. 

I am also writing the same 2D array data into the text file and I get the correct readins there. 

Is there something I am doing wrong here. 

Download All
0 Kudos
Message 1 of 2
(2,269 Views)

If you had read the QL manuals or reference books, you would be aware SQL Server doesn't do multidimensional arrays.

I prefer BLOBs or VARCHAR(MAXCHAR) as an alternative. I enter the values in formatted string values delimiter separated.

But how to deal with multidimensional arrays. Well up to 3-5 you can use simple value for each "dimension". So the lowest dimension

would be comma delimit. The next set of values and each succeeding set for each 2nd dimension values would have the "set" of values separated

by a ":" or semicolon. For the third I use the ":" or colon to separate each 2D block of the 3rd dimension. This can all be easily reparsed

with a multidimensional parser for the application. Should be simple to build. (e.g.. Use string arrays to parse the higher dimensions

and numeric array for the lowest dimension). The VARCHAR(MAXCHAR) has an upper data bound of 2GB! If you have to save more

than 3 dimensions for most all applications, you don't understand how best to analyze the test data and may want to give it more 

thought to optimize the operation as well as the design, so it doesn't get too complex. By the way I use Data Clusters built in the

data order and type as for SQL Server Data Table. This makes the design of the SQL Server interface easy as pie :).

0 Kudos
Message 2 of 2
(2,251 Views)