ResultSet问题,读取不了数据
try{ResultSet pianYiWps=cn.executeQuery("select top 8 * from wp_tbl order by wp_maijia asc");
while(pianYiWps.next()){
String strPianYiName=pianYiWps.getString("wp_name");
String pianYiWpId=pianYiWps.getString("wp_id");
if(strPianYiName.length()>15){
strPianYiName=strPianYiName.substring(0,13)+"...";
}
%> [<%= pianYiWps.getString("wp_fl1") %>] <a href="/showWuPin.do?wuPinId=<%=pianYiWpId%>" target="_blank" ><%= strPianYiName %></a>
(<%= pianYiWps.getString("wp_maijia") %>元)<br>
<%
} pianYiWps.close();
}catch(Exception e){
System.out.println(e);
}
报错:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 1.
我觉得语句没有问题,但是为什么读不了数据呢