Hi, I'm working on a program where I get user input and insert that value to my database. At the moment, I'm getting the following error:
QSqlError(-1, "Unable to fetch row", "No query")
But I know thats its not my coding because when I try a select statement, it works fine with no problems. My INSERT INTO statement is as follows:
Qt Code:
  1. str = pLineEdit->text();
  2. QString qry = QString("INSERT INTO customer (name, phone_no, address, city) VALUES ('%%1%', NULL, NULL, NULL").arg(str);
To copy to clipboard, switch view to plain text mode 

Is my INSERT statement correct?