Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java DECIMAL类型的字符串格式无效_Java_Exception_Prepared Statement_Derby - Fatal编程技术网

Java DECIMAL类型的字符串格式无效

Java DECIMAL类型的字符串格式无效,java,exception,prepared-statement,derby,Java,Exception,Prepared Statement,Derby,我的代码工作正常,直到我关闭并再次运行它。现在我得到了异常“DECIMAL类型的字符串格式无效”。 位于org.apache.derby.client.am.Statement.completeExecute(未知源)” 在我的代码的这一行: String sql = "insert into app.customerinfo values (?,?,?,?)"; PreparedStatement prepSt = conn.prepareStatement(sql); /*i am

我的代码工作正常,直到我关闭并再次运行它。现在我得到了异常“DECIMAL类型的字符串格式无效”。 位于org.apache.derby.client.am.Statement.completeExecute(未知源)” 在我的代码的这一行:

String sql = "insert into app.customerinfo values (?,?,?,?)";
PreparedStatement prepSt = conn.prepareStatement(sql);
    /*i am filling in the place holders in prepSt here in this form:
          prepSt.setInt(1, objCust.getCustID()); */

             int result = prepSt.executeUpdate();
(在prepSt.executeUpdate行)
我是java新手,有人能帮我找出为什么会出现这种异常吗?

显示sql。异常是否发生在运行时?String sql=“插入app.customerinfo值(?,,,?)”;是的,在运行时。在
值之前列出列名
(col1,col2,col3,col4)
,并选中
set*Param
s。我在哪里写set*Param?在
objCust.getCustID()中有什么?那是什么东西?