很奇怪的一个问题,请大神出手,谢谢!

tonybao 2019-03-20 04:51:51
大家好,
我在页面里为了得到dl_al_ah_id的值,写了个结果集,如下:

sql_oracle = "SELECT dl_al_ah_id ah_id FROM sop_invoice_credit_lines WHERE dl_dh_id = " + dispatch_num;
rs_oracle = stm_oracle.executeQuery(sql_oracle);

if (rs_oracle.next())
{
dl_al_ah_id = rs_oracle.getInt("ah_id");
}
else
{
out.println("that's not ok.");
}

这个查询在ORACLE是有结果的(有18条符合条件的记录,值都是一样的),但在页面上结果集就是空的,就是显示个 that's not ok.

oracle 11g
Tomcat 8.5.38

请大神看看,这是为什么呢?

...全文
195 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
freekaiQaQ 2019-03-22
  • 打赏
  • 举报
回复
引用 3 楼 tonybao 的回复:
An error occurred at line: [102] in the jsp file: [/shipping Arraylist cannot be resolved to a type
Arraylist cannot be resolved to a type ---> ArrayList 中的 list 的 L 是大写的。 dispatch_num 换成其他的值 就不是空的了 ,dispatch_num 值是什么?
tonybao 2019-03-20
  • 打赏
  • 举报
回复
An error occurred at line: [102] in the jsp file: [/shipping Arraylist cannot be resolved to a type
tonybao 2019-03-20
  • 打赏
  • 举报
回复
如果dispatch_num换个其它的值,页面上结果集就不是空的了,太奇怪了。求救!
bcsflilong 2019-03-20
  • 打赏
  • 举报
回复

List ids=new Arraylist();
while(rs_oracle.next())
{
dl_al_ah_id = rs_oracle.getInt("ah_id");
out.println(dl_al_ah_id);
}

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧