LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you programatically assign cluster size when using Array to Cluster function

Solved!
Go to solution

@TLKn64 wrote:

 

 

Hope National Instruments eventually make the Cluster Size in Array to Cluster programatically modifiable.


I'm afraid your hope is going to be idle. This is fundamentally impossible with the current paradigma in LabVIEW. The cluster size is part of the compile time data type and that needs to be set at compile time. There is no way to change that at runtime anymore.

Your best bet is to write a function that uses arrays and then creates a dynamic update or query statement. That can be done with parametrized SQL statements, although it is not trivial.

But the approach to map any number of elements to any number of columns in an arbitrary database table is already flawed too if your database uses anything but string datatypes for the columns. The datatype of a column limits the possible data it can accept and most databases will generate an according error if you try to force a string into a column where the string can not be cleanly translated into a valid datatype value.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 11
(336 Views)