I am new in SQL server and labview data base connectivity tool kit. I have made a programe to write the data in SQL table but I am getting the error message"ADO Error: 0x00000001
Argument error; the number of columns does not equal the number of parameters.". I have attached the error message. Please help me out here.
Solved! Go to Solution.
Remove the To Variant and try again. Else the message is clear, the number or columns in Data must match the number of rows in the Columns-array.
Actually this problem is a perfect case for why the DCT is a very poor choice. The problem is that the error message is not clear at all. The problem is that you are turning your input array of strings into a variant, but the results is a variant containing an array of strings. What the input wants -- but doesn't tell you -- is that it needs an array of variants where each element is a variant with a string in it.
Much better to use a simple interface that allows you to input SQL directly. Then when you get an error you can be sure that the error is actually telling you what is wrong. Check here for a broader discussion of the topic, and some drivers that won't cause problems.
Thanks for the post. Now I can write the data into Database. but now I have a different problem.
I need to write the whole setup value from Database Variant( Array of Cluster of 4 String element) to the Labview table(2D array of string). I am able to write the last Row in the table but not able to write the all Data.
I have attached the Labview code for your review. Please help me out here to find the solution.