Java DECIMAL类型的字符串格式无效
我的代码工作正常,直到我关闭并再次运行它。现在我得到了异常“DECIMAL类型的字符串格式无效”。 位于org.apache.derby.client.am.Statement.completeExecute(未知源)” 在我的代码的这一行: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
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()中有什么?那是什么东西?