Answer the question
In order to leave comments, you need to log in
Qt+MySql. Why is exec not processed after prepare?
I'm trying to repeat the lesson with connecting to the database. Always used QSqlQuery::exec and it worked. In the example, before executing the query, pass the query string to QSqlQuery::prepare:
qry->prepare("SELECT position from pos;");
qry->exec();
qry->exec("SELECT position from pos;");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question