Subject Re: [Firebird-Java] How can I tell what row has been inserted into Firebird db via JSP
Author Mark Rotteveel
On 8-3-2012 18:53, unordained wrote:
> Tangent: what about support for something like what FlameRobin does at the end of
> a statement: show how many inserts/updates/deletes took place across all tables
> (incl. via triggers) -- is there anything pre-built for that? From casual poking
> around, I can't even tell what system tables they're getting that from -- or is
> it from the TRACE api?

Neither: this information is requested using isc_dsql_info with a
request array containing isc_info_sql_records

If you use executeUpdate() or getUpdateCount() on Statement it returns
the number of affected rows (it actually returns either the number of
inserts, deletes or updates; whichever is the highest number).

You can also access this information by casting the statement to
org.firebirdsql.jdbc.FirebirdStatement and using getDeletedRowsCount(),
getInsertedRowsCount() or getUpdatedRowsCount()

NOTE: Each call will cause another roundtrip to the server (because of
the way these methods are implemented in Jaybird; it actually does get
all counts at once), so excessive use might harm performance.

Mark Rotteveel