LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert recordset with database connectivity toolkit

Hello.

 

I am trying to build a function that updates database tables between two different databases. I want to make a vi that checks if there is a difference in size between the selected tables in the master and slave databases and in case there is update the table which has fewer values. There will be different tables that i will want to update so I do not know how many columns and which datatypes will be used for each update.

 

The problem I have encountered with this is that i cannot use the Insert vi to insert a complete recordset. Apparently it is not possible to insert arrays, and i simply get a statement claiming that the data to be inserted has the wrong dimensions, even though i am completely sure it has the right ones.

 

I have searched the forum for solutions and from what I gather I have to convert the recordset array into a cluster in order to insert it, but since there are a lot of different tables to be updated and each one contains different things that's kind of tricky. At least for me it is...=/

 

Anyhow, to summarize: Does anyone know of a good way to insert arrays into a database that doesnt require me to write a separate function for every kind of table I want to update?

 

The code that I've written is appended as well in case someone wants to look at it. there are also some further explanations in there in case I haven't been able to communicate the problem properly here.

 

Best regards! 

0 Kudos
Message 1 of 2
(2,472 Views)

I have exactly the same issue. Does any one have an idea?

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