[gnome-db] IMPACTED_ROWS



Hi!

gda_connection_statement_execute_non_select returns correct number of affected rows (UPDATE prepared statement) when I use SQLite provider. With MySQL one, there's 0 returned, even if at least one row has been affected.

I use libgda 4.2, but I suspect the same issue is valid for 4.0.

Can I work around it somehow?

I can do:

SELECT x WHERE y=z;
if (x) UPDATE
if (!x) INSERT

But this seems to be much better.
affected_rows = UPDATE
if (affected_rows == 0) INSERT

Piotras


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]