【问题标题】:How can I see the content of a ResultSet object inspecting it using the Eclipse debugger?如何使用 Eclipse 调试器查看 ResultSet 对象的内容?
【发布时间】:2015-02-12 21:35:37
【问题描述】:

我在使用 Eclipse 调试器时遇到以下问题。

我必须检查一个 ResultSet rs 对象,其中包含从查询中获得的一些行。

我将我的 rs 对象放入 Eclipse 调试器 expression 区域以分析其内容,但我不明白如何执行以下操作:

  1. 我的 ResultSet 对象中包含的行数存储在哪里。

  2. 如何查看调试器 表达式 区域内的行? (我想查看行及其内容)

【问题讨论】:

  • ResultSet 只包含当前行,不知道总行数。

标签: java eclipse debugging ide resultset


【解决方案1】:

你不能:

https://www.java67.com/2018/01/jdbc-how-to-get-row-and-column-count-from-resultset-java.html

因为 Java 数据库连接使用流式 API,它不会一次返回所有结果。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-24
    • 2010-12-08
    • 1970-01-01
    • 2011-03-28
    • 1970-01-01
    • 2012-08-25
    • 2012-07-09
    • 2011-11-01
    相关资源
    最近更新 更多