LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DB Insert Example question

    I want to insert data into a SQL database using the Insert Example.vi, as a base for my code.  I have to add a large number of parameters to the database.  My questions:

Is there a limit to the number of parammeters I can add?

I noticed that the example added two parameters (Device name and number of samples)  It then uses "DB tools free object.vi" two times.  Do I have to call the "DB tools....vi" once for every parameter I send?

thanks
Bob
 
0 Kudos
Message 1 of 3
(2,731 Views)
Hi Fluitron,

Could you please let me know what toolkit or module you installed that contains the insert example vi? Also, what version of LabVIEW are you using? Please let me know. Thanks!

Best regards,

Steven
0 Kudos
Message 2 of 3
(2,704 Views)

There is no "limit" to the amount of fields that you can pass through an ODBC to SQL other than your connection timing out if it is EXTREMELYYYYY large.... I would guess that for all practical purposes you would not reach this point.

You can use the Insert Data vi which you would just have to specify the table name that you want to insert. Keep in mid that if you use this functiuon, you need to insert a cluster with THE SAME exact amount of fields as your table in the database. You would use this function if you want to insert a value to every single field in the database. If you dont, then you would use the Execute SQL Query vi, which you would wire a string with your query which in this case would be an INSERT statement.

I hope this helps.

Jaime

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