I seek help for this issue I couldn't find an answer anywhere. I have a program that loads multiple string variables and then I am trying to paste them into a sqlite3 database, everything seems good, I have a conection, but this piece of code gives me an error : expected ';' before string constant (it asks for it before the farba variable. Any ideas?
QSqlQuery query;
query.exec("INSERT INTO spz VALUES") "(Meno,Priezvisko,Datum,Bydlisko,COP,Znacka,Model,Farba,Objem,Rok,SPZ) VALUES('" meno "','" priezvisko "','" vek "','" bydlisko "','" cop "','" vyrobca "','" model "','" farba "','" objem "','" rok "','" znacka"');");
query.exec()function. That way you can print it out to see if it is building correctly.SQLstring. For example if they contain quotes. So you may need to escape some of your fields. Printing theSQLout should highlight such problems.