数据类型是int的updatepeoplesetkyjf=0wherekyjf='null'为什么我用SQL语句修改不了呢在添加的时候也出现错误代码部分:IntegerJf=Integer.parseInt(request.getParameter("jf"));Stri...
数据类型是int的
update people set kyjf=0 where kyjf='null'
为什么我用SQL语句修改不了呢
在添加的时候也出现错误
代码部分:
Integer Jf=Integer.parseInt(request.getParameter("jf"));
String dy=people.getDy();
Integer kyjf=people.getKyjf();
String vip=people.getQt();
Integer zjf=Integer.parseInt(dy)+Jf;
System.out.println("vip====>"+vip);
System.out.println("kyjf====>"+kyjf);
System.out.println("Jf===>"+Jf);
if(kyjf==null&&kyjf.SIZE<=0){
kyjf=0;
}
System.out.println("kyjf000===>"+kyjf);
189行 int kjf=kyjf+Jf;
System.out.println("kyf===>"+kjf);
System.out.println("zjf===>"+zjf);
出现错误:
vip====>345345
kyjf====>null
Jf===>46
kyjf000===>null
WARN - Unhandled Exception thrown: class java.lang.NullPointerException
2011-8-24 8:23:37 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at com.xinhong.struts.action.PassengerAction.addGjvipclk(PassengerAction.java:189)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
展开