I have a table test with three columns ID,value and value_sim. I want to insert values to the value_sim column. I have written the following code but I am getting an error.
qry1->prepare("INSERT INTO TEST (VALUE_SIM)"
"VALUES (:VALUE_SIM)"
"where ID = 326");
qry1->bindValue(":VALUE_SIM", hxt_val_ft04);
qry1->exec();
hxt_val_ft04 is a float variable which has a value stored in it.
The following error is then raised:
Error: QODBC Result :: exec: Unable to execute statement: "[Microsoft] [SQL Native Client] [SQL Server] Incorrect syntax near the keyword WHERE [Microsoft] [SQL Native Client] [SQL Server] Statement (s). (s) could not be prepared. "
Kindly help me in correcting the error.