开发者

Updating RowSet if table content is changed?

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 g开发者_JAVA百科et 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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜