简体   繁体   中英

Updating RowSet if table content is changed?

Is it possible to update/refresh a RowSet 's in case the table content is changed (for eg 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM