[Interest] Did the bound value handling changed in 5.x? If yes, why?
Joseph Crowell
joseph.w.crowell at gmail.com
Fri May 24 05:21:46 CEST 2013
New way looks pretty similar to mysqli prepared statements in php.
On 5/23/2013 7:31 AM, Guido Seifert wrote:
> I am wondering.
> I have a program, which runs perfectly fine with Qt 4.8.
> In dozens of places I do:
> QString queryString = "SOME SQL STATEMENT with :foo;";
> QSqlQuery query(queryString, database);
> query.bindValue(":foo", xxxxxx);
> query.exec();
>
> Now I tried to compile the program with Qt 5.1. Compiles fine,
> but the database stuff is totally broken. Above value binding
> does not seem to work anymore.
>
> Now I have to do:
> QString queryString = "SOME SQL STATEMENT with :foo;";
> QSqlQuery query(database);
> query.prepare(queryString);
> query.bindValue(":foo", xxxxxx);
> query.exec();
>
>
> Not too difficult to change, but WHY?
>
> Guido
>
>
More information about the Interest
mailing list