当前位置: 技术问答>java相关
我使用直接update修改的话,还是会报错(急死我了)
来源: 互联网 发布时间:2015-11-16
本文导语: 修改记录测试办 出错信息: 500 Servlet Exception Note: sun.tools.javac.Main has been deprecated. /website/change1.jsp:24: Invalid character constant. String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"...
修改记录测试办
出错信息:
500 Servlet Exception
Note: sun.tools.javac.Main has been deprecated.
/website/change1.jsp:24: Invalid character constant.
String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
^
/website/change1.jsp:24: Invalid character constant.
String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
^
/website/change1.jsp:24: ';' expected.
String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
^
/website/change1.jsp:24: Invalid character constant.
String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
^
/website/change1.jsp:24: String not terminated at end of line.
String strtb4="update employee set name='"+strtb1+"'",gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
^
5 errors, 1 warning
--------------------------------------------------------------------------------
Resin 1.1.3 -- Thu Jun 29 12:04:45 PDT 2000
|
String strtb4="update employee set name='"+strtb1+"',gender='"+strtr2+"',age='"+strtb3+"' where id = '"+strtb+"'";
这句里面的strtr2写错了,应该是strtb2
这句里面的strtr2写错了,应该是strtb2
|
如果是数字 update * set col=1 就可以了不需要 col='1'