if(this.rs.isFirst()){
this.rs.last();//抛该异常
PropertiesUtil.setProperty("UpdateUserInfo.beginTime", df2.format(df.parse(this.getFieldValue(17).toString())));
this.rs.first();
this.rs.last();//抛该异常
PropertiesUtil.setProperty("UpdateUserInfo.beginTime", df2.format(df.parse(this.getFieldValue(17).toString())));
this.rs.first();
}
原因:默认mssql链接是不支持游标操作
修改如下:
将
this.stmt = this.conn.createStatement();
改为
this.stmt = this.conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);