<%
prestmt=con.prepareStatement("select top 3 * from "+enttable+" t where not exists ( select 1 from "+enttable+" where goodsid <t.goodsid and (opertiontime=t.opertiontime or unitprice=t.unitprice))");
prestmt.setInt(1,nclassid);
rs = prestmt.executeQuery();
while(rs.next())
{
dbunitprice=rs.getDouble("unitprice");
dbinput=rs.getString("opertiontime");
%>
<tr>
<td align="left" bgcolor=#E7FAFF> <%=i%> </td>
<td align="left" bgcolor=#E7FAFF> <%=dbinput%> </td>
<td align="left" bgcolor=#E7FAFF> <%=DataFormatUtil.GetDoubleOne3(dbunitprice)%> </td>
</tr>
<%
}
%> 报错:出现意外错误:java.lang.NullPointerException
prestmt=con.prepareStatement("select top 3 * from "+enttable+" t where not exists ( select 1 from "+enttable+" where goodsid <t.goodsid and (opertiontime=t.opertiontime or unitprice=t.unitprice))");
prestmt.setInt(1,nclassid);
rs = prestmt.executeQuery();
while(rs.next())
{
dbunitprice=rs.getDouble("unitprice");
dbinput=rs.getString("opertiontime");
%>
<tr>
<td align="left" bgcolor=#E7FAFF> <%=i%> </td>
<td align="left" bgcolor=#E7FAFF> <%=dbinput%> </td>
<td align="left" bgcolor=#E7FAFF> <%=DataFormatUtil.GetDoubleOne3(dbunitprice)%> </td>
</tr>
<%
}
%> 报错:出现意外错误:java.lang.NullPointerException
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货