Repeated retrieval in result set returns null

前端 未结 1 335
臣服心动
臣服心动 2021-01-21 12:51

I\'m having an issue with ResultSet.getString where when I call it the first time it returns the value but the second time returns null (this without closing the re

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 13:28

    From the Javadoc:

    For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.

    Under the hood, you are consuming bytes from a TCP stream, so it isn't too surprising that you can't retrieve the same column value twice.

    0 讨论(0)
提交回复
热议问题