ResultSet exception - before start of result set

后端 未结 6 811
独厮守ぢ
独厮守ぢ 2020-11-21 23:30

I\'m having trouble getting data from a ResultSet object. Here is my code:

    String sql = \"SELECT type FROM node WHERE nid = ?\";
    PreparedStatement pr         


        
6条回答
  •  走了就别回头了
    2020-11-22 00:10

    You have to call next() before you can start reading values from the first row. beforeFirst puts the cursor before the first row, so there's no data to read.

提交回复
热议问题