LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database conectivity

Solved!
Go to solution

Hi

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.

 

 

Regards,

Srikant

Download All
0 Kudos
Message 1 of 6
(3,194 Views)

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.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(3,163 Views)
Solution
Accepted by topic author SKant

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.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(3,140 Views)

Hi 

I removed the To variant function and tried thereafter also i am getting the same error.

0 Kudos
Message 4 of 6
(3,113 Views)
Yes you will, and for the same reason as when you were converting the array to variant yourself. Did you read my post?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(3,083 Views)

Hi Proven,

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.

 

 

Thanks,

Srikant

0 Kudos
Message 6 of 6
(3,061 Views)