I created a table with this statement:
And then I inserted three records like this:
query.exec("CREATE TABLE IF NOT EXISTS teeee(teeee_id INT, distance INTEGER, type TEXT, PRIMARY KEY (teeee_id))");
The query.lastError() gave me this error message:
qresult = q.exec("INSERT INTO teeee (teeee_id, distance, type), VALUES (123, 332, 'type1')");
constraint failed unable to fetch row
However, I can still select the data successfully, but I have no idea how to remove this error.