08-28-2014 04:46 AM
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.
08-28-2014 05:42 AM
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)
/Y
08-28-2014 05:43 AM
Hi Yamaeda
The cluster is being wired directly using a local variable it's just the way the code snippet saved it for uploading
08-28-2014 05:49 AM
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.
/Y
08-28-2014 05:53 AM
I wired directly still resulting in the same error
08-28-2014 06:17 AM
Hi,
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.
08-28-2014 06:17 AM
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?
/Y
08-28-2014 06:30 AM
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
08-28-2014 06:39 AM
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.
08-28-2014 06:41 AM
If possible share code in LabVIEW 2010 version so that I can take a look.