Data change listener on select result with jaybird

312 views Asked by At

Do you know if there is a way to use a data listener on a select query with jaybird.

For example I've got a query like

select count (*) from my_table where my_statut='x'

the result give me 50.

My application change the field my_statut to 'y' for one row, is there a way to catch the new result with a value/data... change listener in java?

Thanks for your help.

Simon

2

There are 2 answers

1
rstrelba On BEST ANSWER

It is possible via trigger and event api. Take a look CHAPTER 8 of this manual http://www.firebirdsql.org/file/documentation/drivers_documentation/Jaybird_2_1_JDBC_driver_manual.pdf

0
Mark Rotteveel On

No, this is not possible. Once a resultset is created by a query it is fixed and will not change (except for changes made by the program itself to a CONCUR_UPDATABLE resultset), also - depending on the exact transaction configuration - you can't see any changes made in other transactions.

If your application needs to be aware of changes, you could look into the events mechanism provided by Firebird and Jaybird.