Showing results for 
Search instead for 
Did you mean: 

Database connectivity error -2146825023 occurred at CmdSetparameter

I´m using LabVIEW 8.2, the Database Connectivity toolset version 1.0.1. and the MS ACCESS 2003 database.
When I try yo UPDATE the fields in a table I get the error -2146825023 occurred at CmdSetParameter Value(C).vi. Exception occurred in ADODB
Any idea why I am getting the error ?
0 Kudos
Message 1 of 7
Hi Simbani,

Could you post your vi or a pic of what your trying to do. At the very least you need give us the complete SQL command that you are sending to the database.


0 Kudos
Message 2 of 7

Hi Russ,

I´m sending the file "Error at Cmd.doc where you can see the SQL and vi. The Table´s name is Ensayo and the DataBase is called Pernos



0 Kudos
Message 3 of 7
If those columns are numeric data types, you do not enclose them with the ' mark. That is reserved for text.
0 Kudos
Message 4 of 7

First off have you looked at the execution of the program to see which vi is producing the error. My first concern is that you have not correctly established a connection to the database and the table in question. So always check to see that the "Open Connection" vi is not producing an error.

That being said it looks to me that you are using the "Create Parameterized SQL" incorrectly. In your parameterized query there should be question marks as place holders for parameters that will be set at some later point. I tend to construct my own SQL queries and not use that parameterized vi's. Take a look at the "Insert" that comes with the connectivity toolkit. It is a example of how to insert the same data using multiple methods, including the standard build you own SQL query (which I recommend you do) and the parameterized method (which is the method you are attempting).

hope this helps


0 Kudos
Message 5 of 7
Thanks a lot !
I am using the EXE with the SQL UPDATE without any trouble
0 Kudos
Message 6 of 7
From what I can see from the screen capture, you are using the Parameterized Query VIs but with a query that doesn't contain parameters.  You can reduce your diagram to just the Open, Execute Query, Free the reference, and Close VIs.  Both the Execute Query and Parameterized Query VIs are described in Ch 5 of the User Manual.
0 Kudos
Message 7 of 7