From: Gustaf N. <ne...@wu...> - 2014-02-06 21:56:49
|
For the time being, i've used (abused?) the public Dbi_Handle->rowIdx to return in the DML case the number of affected rows. This has the advantage, that all data-structures are unchanged, and the modifications are quite local. -g Am 06.02.14 14:12, schrieb Gustaf Neumann: > Hi Stephen, > > in contrary to the documentation, dbi_dml does not return the number > of rows affected by the query. Typically the dbi_* tcl commands > are implemented via Exec() followed by a retrieving cmd, like in > > dbi_1row does an Exec() + NextRow() > dbi_rows does an Exec() + many NextRow(), > etc. > > but dbi_dml does the Exec() and nothing after that to > retrieve the result (which is in pg: PQcmdTuples(res)). > > What is your suggestion to fix this? > - extend the record of Dbi_DriverProc? (new function) > - mangle NextRow() to return the result in the dml case > - extend the Dbi_Handle structure such that Exec() > can return this value directly? > others? > > -gustaf > -- Univ.Prof. Dr. Gustaf Neumann WU Vienna Institute of Information Systems and New Media Welthandelsplatz 1, A-1020 Vienna, Austria |