LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write into a table in database

hello,

 

I am trying to read/write from/into a database.

 

Well reading is simple. The issue is with writing,

  • a. I want a GUI with  no Queries , that means the Recordset has to be read in a Cluster first and then editted and writtenn back or say a new recordset is created.
  •  b. have I had only 1 -2 Tables its not a work to create Cluster(as mentioned in the egs for database connectivity module ) but 1o  15 table are a issue.

 Is there an example of dynamically creating Clusters for this purpose. ??

 

regards

Akshay

(using LV2013)

 

0 Kudos
Message 1 of 3
(2,272 Views)

It is possible to programmatically generate entire VIs using VI Scripting. (Enabled in Tools > Options > VI Server > VI Scripting)

 

This VI will generate a typedef control containing a cluster with a string and an I16:

scripting.PNG

Since you can read information about column names and data types of a given database table, you can programmatically generate clusters matching the table, and so don't have to do this by hand.

 

I think it is not possible to use this control directly in the VI that created it. However, it might be possible to script an other VI, which uses the just  created control to cast the data read from the DB to labview, edit it, and then writes it back to the DB. This VI could be loaded into a Subpanel of the current VI. But I did not test this.

0 Kudos
Message 2 of 3
(2,243 Views)

thanks Sebastian I will give it a try

0 Kudos
Message 3 of 3
(2,240 Views)