2

Is it possible to update/refresh a RowSet's in case the table content is changed (for e.g. another application modifies it)? So this way I 'always' have an up-to-date version of the table.

I looked into RowSetListener, but these events seem to get invoked only if I make modifications to the RowSet directly. It would be enough to know that there was a change, I know... that's a lot :)

Please share your thoughts! Thanks in advance! Daniel

Daniel Szalay
  • 4,041
  • 12
  • 57
  • 103

2 Answers2

1

No, there are no any way, for most traditional RDBMS. Just because of http://en.wikipedia.org/wiki/ACID#Isolation

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
0

Yes, a RowSet can be refreshed. Just call its "execute()" method again.

Per the docs:

If this method is successful, the current contents of the rowset are discarded and the rowset's metadata is also (re)set.

A rowSetChanged event fires upon this refresh.

If you are asking if a RowSet can be automatically refreshed when data is changed on the database server: No way that I know of. You may not want to know of such changes, depending on your isolation level, locking, and MVCC strategy.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154