How to handle auto_increment with bindvalue()
Unsolved
General and Desktop
-
i have this simple table named Dependencies with following columns
depe_ID : INT AUTO_INCREMENT PRIMARY KEY
filename : varchar
revision_number : INTi have this query to execute
query.prepare("INSERT INTO Dependencies (depe_fileName,revision_number) " "VALUES ( ? , ?)"); query.bindValue(1,filename); query.bindValue(2, revision_number);
i get this error :
QSqlError("", "Parameter count mismatch", "")
-
Hi,
At first sight your position parameter to bindValue are wrong. You have two values so it should be 0 and 1 not 1 and 2.