首页 > 代码库 > Springmvc UPDATE 数据时 ORA-01858:a non-numeric character was found where a numeric was expected
Springmvc UPDATE 数据时 ORA-01858:a non-numeric character was found where a numeric was expected
ORA-01858:a non-numeric character was found where a numeric was expected 异常。
我的代码:
主要是绑定变量带出来的问题。
出错原因是:preparedstatement在执行的时候不能把带有to_date的参数的串替换为sql中的问号,主要是to_date函数替换不了,解决办法是将to_date函数先放到sql语句中,然后替换后面的变量,就不报这个错误了。
错误异常:
修改后的代码:
参考: http://blog.csdn.net/u010526028/article/details/70843610
Springmvc UPDATE 数据时 ORA-01858:a non-numeric character was found where a numeric was expected
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。