I am trying to insert a cluster into a SQL database using the database connectivity tools. I get an error (attached). See attached the code I am using
Solved! Go to Solution.
Looks to me like the string is too long for the string field in the DB.
(You should wire the cluster directly instead of going via ref->property)
The cluster is being wired directly using a local variable it's just the way the code snippet saved it for uploading
Then you have a race condition. You cant guarantee the local variable is using the newest or previous value, it's depending on when it updates ... wire directly to make sure.
I wired directly still resulting in the same error
I could not see your code because I dont have 2013 with me. please check following points
1. Please connect column name input
2. Make sure number of elements in cluster equals number of column.
3. make sure data type for each element is properly defined in SQL table, generally assigning text does not cause problems.
So, how long text are you sending to the database, and how long it the text field configured?
Can you "make current values default" after a unsuccesful run and post the vi so we can see what you're sending?
I'm using labview to create the table using the insert vi by setting create table to true. If I connect the columns I get error 1 saying the number of columns does not match the the number of parameters
I will still suggest to connect column names, and make sure you have equal number of column and elements to be inserted.
As error it self is suggesting that number of elements and number of column are not matching, please check that part.
If possible share code in LabVIEW 2010 version so that I can take a look.