这条sql语句 update TB_SELF_CUSTOMER set n_state=0 ,n_audit_state=0 where n_self_customer_id=? 为什么在数据库里更新可以用,在程序里就报错 ORA-01722: 无效数字 ; nested exception is java.sql.SQLException: ORA-01722: 无效数字! 谁能帮看下
解决方案 »
- 运行javaEE5权威指南的bookstore示例出错,求高人指点
- webservice部署时报错,请高手指点
- 探讨:关于中小量数据的备份,再此提供一种解决方案
- 求JSP的新闻发布系统
- struts中jsp实现frame结构,是用<html:frame>吗?
- 初学J2EE的问题,看了不要笑,分不够再加
- 关于使用struts的form-bean来更新数据库,请高手指教,急!!!
- 怎么样JDOM转换成byte[]字节啊?还有又怎么把byte[]转换成JDOM啊?急急!
- hibernate 怎么设置主键手动赋值
- 关于小说实现下一章阅读
- 一个有问题的系统,不知道问题出在哪
- mybatis的sql语句中加号表示什么意思?
而不能是ps.setString(xxx);之类的
StringBuffer sql = new StringBuffer();
if (params.get("selfcustomerid") != null
&& ((String) params.get("selfcustomerid")).length() > 0) {
sql.append("update TB_SELF_CUSTOMER set n_state=0 ,n_audit_state=0 where n_self_customer_id=? \n");
paramList.add(params.get("selfcustomerid"));
}
jdbc.execute(sql.toString(), paramList.toArray());都在这里了
paramList里面add的根本就不是int型。还说不可能先试试
jdbc.execute(sql.toString(), new int[]{357});
sql.append("update TB_SELF_CUSTOMER set n_state=0 ,n_audit_state=0 where n_self_customer_id=? \n");
paramList.add(params.get("selfcustomerid"));
错了sql.append("update TB_SELF_CUSTOMER set n_state=0 ,n_audit_state=0 where n_self_customer_id=");
sql.append(" '" + 你要传的值+ "' ");
去掉末尾的 \n 试试