Subject Re: [Firebird-Java] How can I tell what row has been inserted into Firebird db via JSP
Author Mark Rotteveel
On 9-3-2012 17:47, unordained wrote:
> ---------- Original Message -----------
> From: Mark Rotteveel<mark@...>
>> 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()
>> Mark Rotteveel
> ------- End of Original Message -------
>
> Hmmm, not really what I meant. Those still just return "global counts". What I
> was meaning was something like this:
>
> Executing statement...
> Statement executed (elapsed time: 0.625s).
> 5298 fetches, 38 marks, 121 reads, 1 writes.
> 4 inserts, 5 updates, 0 deletes, 623 index, 0 seq.
> Delta memory: 2054240 bytes.
> BT_LOGS: 1 inserts.
> BT_FLAG_REF: 2 updates.
> BT_LOANS: 1 updates.
> BT_FLAG_LOANS: 2 updates.
> BT_EVENT_REF_HEAD_MOD: 1 inserts.
> LO_LOANS: 1 inserts.
> LO_EVENT_REF_HEAD_MOD: 1 inserts.
> 1 row affected directly.
> Total execution time: 1.844s
>
> I'm talking about that section in the middle, with the counts per-table. I really
> ought to just poke at their source. Thanks though!

Jaybird does not provide that kind of statistics. Technically it
probably could, but it would require a call before and after every
statement as far as I understand (as the calls involved keep a running
total since the attach). See page 413-414 from the IB 6 API guide.

I am not sure if Jaybird actually exposes isc_database_info in an easily
accessible way.

Mark
--
Mark Rotteveel