LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing to SQL server issue

I have a standard 2005 SQL server express with a simple database, one table with 15 long int and 2 date x 10 rows (records)

 

Using the built-in DB toolkit, I was able to obtain the table.  It didn't display the date correctly but I was able to obtain it.  Now, the issue is when I tried to drop or insert a replacement table, it won't let me.  I've already enabled all read and write access from SQL studio.  Any suggestion on getting this to work?  Is it possible that DB Insert Data vi is inserting it as variant and it didn't convert to SQL table format properly?

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

The insert data VI, as its name suggests, inserts data, not a table. If you want to insert a table, use the query VI and give it your own SQL code.

 

Additionally, the insert data VI is supposed to be a shortcut - it expects the data as a cluster, where each element in the cluster corresponds to a field in the table (or in the array of field names you give it). I'm assuming the example finder (Help>>Find Examples) has some examples of how to use it.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(1,923 Views)