gpt4 book ai didi

java.sql.SQLException : Exhausted Resultset

转载 作者:IT老高 更新时间:2023-10-28 20:44:59 26 4
gpt4 key购买 nike

我收到错误 java.sql.SQLException: Exhausted ResultSet 来对 Oracle 数据库运行查询。该连接是通过 Websphere 中定义的连接池进行的。执行的代码如下:

if (rs! = null) (
while (rs.next ()) (
count = rs.getInt (1);
)
)

我注意到结果集中包含数据(rs.next ())

谢谢

最佳答案

我在处理结果集后尝试访问列值时看到此错误。

if (rs != null) {
while (rs.next()) {
count = rs.getInt(1);
}
count = rs.getInt(1); //this will throw Exhausted resultset
}

希望对你有帮助:)

关于java.sql.SQLException : Exhausted Resultset,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3502005/

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