I just updated one of my databases including the creation of a new table, AUTO_VERIFICATION. That table is created with the following query:
CREATE TABLE AUTO_VERIFICATION (stock text NOT NULL PRIMARY KEY, current_value double, last_high double, last_low double)
Later when trying to insert the first entry using the same kind of code I already used successfully to insert data in other tables, I get an error in the following way (this uses my app's custom error message):
Error in call to MShareDatabase::execQuery: near \"0.00\": syntax error Unable to execute statement (query: INSERT INTO AUTO_VERIFICATION (stock, current_value, last_high, last_low) VALUES ('CYRE3', 0.00, 0.00, 0.00)
I just can't understand this error! I already checked with other parts of the code where I create other tables and insert data into them and it's the same syntax. I also used one of these websites where you can check if your SQL syntax is fine and it returned OK to me.
Could anybody please tell me what is the problem?
I'm using SQLite with Qt 5.5 and just for the record all other database transaction functions in my code (quite a lot) are working fine.
Aucun commentaire:
Enregistrer un commentaire