如果表内容更改则更新 RowSet?
如果表内容发生更改(例如另一个应用程序修改它),是否可以更新/刷新 RowSet
?这样我就“始终”拥有该表的最新版本。
我研究了 RowSetListener
,但这些事件似乎只有在我直接修改 RowSet
时才会被调用。知道发生了变化就足够了,我知道......变化很大:)
请分享您的想法!提前致谢! 丹尼尔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,对于大多数传统的 RDBMS 来说没有任何办法。只是因为 http://en.wikipedia.org/wiki/ACID#Isolation
No, there are no any way, for most traditional RDBMS. Just because of http://en.wikipedia.org/wiki/ACID#Isolation
是的,可以刷新 RowSet。只需再次调用其“execute()”方法即可。
根据文档 :
rowSetChanged< /a> 事件在此刷新时触发。
如果您询问当数据库服务器上的数据更改时是否可以自动刷新 RowSet:据我所知不可能。您可能不想知道此类更改,具体取决于您的隔离级别、锁定和 MVCC 策略。
Yes, a RowSet can be refreshed. Just call its "execute()" method again.
Per the docs:
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.