LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database tool insert data problem

Hi All,

 

I had created a simple database with labview (UDL connection). My data input is 2 string control and 1 numeric control and then go through a Bundle function. And my column is a 1D string control Arraywhich connected to the column terminal of the Database tool insert data as shown in the attached pic (Block diagram.jpg).

 

But whenever I tried to connect the column array to the column terminal, I will got a error message  as shown in the attachedpic (error message.jpg).

 

And when I disconnected the column array from the column terminal then its can create the table and write the data into the database.

 

Anyone can provide some advises on this problem? as I only left 2 weeks time to finish this project and I only went through a 1 week lecture class on LabVIEW so now still exploring.

 

Thanks

 

 

 

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

Press Ctrl+H to open up the Context Help window in the block diagram, and then click on Detailed Help and have a look at what the Insert subVI is expecting:

 

data is the data you want to insert in the database. If data is a cluster, LabVIEW inserts each item in the cluster in the table corresponding to each element in the columns input. The order is determined by the cluster order of the cluster such that the 0th item in the cluster is inserted into the column name given in the 0th element of the columns input. If the columns input is empty, the 0th item of the cluster is inserted into the first column in table.

If data is not a cluster, data is inserted into the column specified by the columns input. 

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 4
(2,672 Views)

I already read those help context...and my problem now is why I cannot connect my column (array of string controls) to the column terminal?

 

I need to write the column name in the table but now there is error whenever I connected my column (array of string controls) to the column terminal.

 

If I not connected this column (array of string controls) to the column terminal, its work but the column name is default "col0", "col1" and so on....

 

Anyone can help on this problem?

 

The error message and my connection diagram are in the attached file.

 

Thanks

0 Kudos
Message 3 of 4
(2,658 Views)
The column names are whatever you used when you created the table. This VI is just writing. Using the insert to create column names is just plain wrong. It's for specifying the column where you want to insert data.
0 Kudos
Message 4 of 4
(2,653 Views)