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

出错原因是:preparedstatement在执行的时候不能把带有to_date的参数的串替换为sql中的问号,主要是to_date函数替换不了,解决办法是将to_date函数先放到sql语句中,然后替换后面的变量,就不报这个错误了。

错误异常:

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

 参考: http://blog.csdn.net/u010526028/article/details/70843610

 

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2021-05-24
  • 2021-12-23
  • 2021-09-05
猜你喜欢
  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
相关资源
相似解决方案