我有一个问题,我想做的是 得到当前的日期 和一张桌子上的专栏。这是我目前为止的代码:
s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
rset = s.executeQuery("select getdate() as date, tglpengiriman from orders");
java.sql.Date date = rset.getDate("date");
java.sql.Date tglkirim = rset.getDate("tglpengiriman");
And throwing exception "no current row in ResultSet" in line 3 of my code above. What s wrong with my code? Missunderstanding usage of ResultSet, maybe?
谢谢你的回答...
EDIT: answered. Please see post from @Christopher below. Thanks