[Qt-interest] Proper way to update a BLOB field

Eric Landuyt eric at datarescue.be
Wed Apr 14 15:51:01 CEST 2010


Hello David,

DB> QString str = "UPDATE MyTable SET x='" + QString::number(myClass->x) +
DB>     "', y='" + QString::number(myClass->y) +
DB>      ", headerState" + myClass->byteArray +
DB>       " WHERE id='" + QString::number(myClass->id));

as Andre suggested, you should use placeholders.
Also, it looks like an '=' is missing right behind your 'headerState' column.

--
Eric Landuyt, Developer - mailto:eric at datarescue.be
DataRescue sa/nv - http://www.datarescue.com




More information about the Qt-interest-old mailing list