java - JDBC ResultSet Scroll Sensitive 类型和Result Set Scroll Insensitive 类型

标签 java jdbc

谁能告诉我 JDBC ResultSet Scroll Sensitive Type 和 Result Set Scroll Insensitive Type 之间的区别?

我们通常在项目中的什么地方使用这些?

最佳答案

ResultSet 对象的类型决定了它在两个方面的功能级别:操作游标的方式,以及 ResultSet 对象如何反射(reflect)对基础数据源所做的并发更改。

TYPE_SCROLL_INSENSITIVE:

The result can be scrolled; its cursor can move both forward and backward relative to the current position, and it can move to an absolute position. The result set is insensitive to changes made to the underlying data source while it is open. It contains the rows that satisfy the query at either the time the query is executed or as the rows are retrieved.

TYPE_SCROLL_SENSITIVE:

The result can be scrolled; its cursor can move both forward and backward relative to the current position, and it can move to an absolute position. The result set reflects changes made to the underlying data source while the result set remains open.

引用javase tutorial了解更多详情。

关于java - JDBC ResultSet Scroll Sensitive 类型和Result Set Scroll Insensitive 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11795670/

相关文章:

java - 我想在 JPanel 中插入超链接

java - 如何获取微调器上所选项目的 ID?

java - Jsoup 设置接受 header 请求不起作用

java - 没有 xml 的 Hibernate

java - 将日期保存到 Oracle 时的奇怪行为

java - 关闭liferay portlet中的jdbc资源

java - 安卓小部件

java - 索引越界。应如何将 resultSet 中的数据存储到 ArrayList 中?

java - Spring 工具套件 - ClassNotFoundException : oracle. jdbc.driver.OracleDriver

postgresql - 使用 PostgreSQL JDBC 连接 URL 中/etc/hosts 中的条目