gpt4 book ai didi

java - 关闭结果集的游标?

转载 作者:行者123 更新时间:2023-12-01 14:13:37 28 4
gpt4 key购买 nike

来自this oracle java教程:

The following statement specifies that the cursor of the ResultSet object generated from the getPrice query is closed when the commit method is called. Note that if your DBMs does not support ResultSet.CLOSE_CURSORS_AT_COMMIT, then this constant is ignored:

getPrice = con.prepareStatement(query, ResultSet.CLOSE_CURSORS_AT_COMMIT);

这是否意味着ResultSet.CLOSE_CURSORS_AT_COMMIT关闭了ResultSet?从名字上看,它只是关闭了ResultSet的游标。如果是这样的话,那有什么用呢?PS:我知道在 con.commit() 之后发生的任何事情都会结束。但实际上关闭了什么?光标?光标是什么意思?提前致谢。

最佳答案

这就是 the javadoc说:

The constant indicating that open ResultSet objects with this holdability will be closed when the current transaction is commited.

所以是的,结果集本身将被关闭。

关于java - 关闭结果集的游标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18299252/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com