[Qt-interest] QSqlQuery::numRowsAffected

Rick Vernam rickv at hobi.com
Fri Jun 26 20:55:01 CEST 2009


On Monday 22 June 2009 3:20:04 pm Rick Vernam wrote:
> I have very simple update query, which also returns data.
> In Postgres' psql, I run:
> update sometable set somefield = somevalue where somecriteria=whatever
> returning someothervalue;
>
> When I run this query via the QPSQL driver, sometable.somefield is indeed
> updated to somevalue, however QSqlQuery::numRowsAffected returns zero.
>
> If I run the query without the returning clause, then I get a valid result
> from QSqlQuery::numRowsAffected.
>
> So is this the expected behavior?
>
> Thanks,
> -Rick

Nobody knows?

> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list