2
回答
java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 124
滴滴云服务器,限时包月0.9元,为开发者而生>>>   

java.sql.SQLException: 索引中丢失  IN 或 OUT 参数:: 124
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
 at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1711)
 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3311)
 at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3400)
 at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteUpdate(WSJdbcPreparedStatement.java:948)
 at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:615)

抛出这样的异常,一般都是什么情况引起的?

代码中:

String sql = "insert into sale("
    + "csaleid, pk_corp, vreceiptcode, creceipttype, cbiztype, finvoiceclass, finvoicetype, vaccountyear, binitflag, "
    + "dbilldate, ccustomerid, cdeptid, cemployeeid, coperatorid, ctermprotocolid, csalecorpid, creceiptcustomerid, "
    + "vreceiveaddress, creceiptcorpid, ctransmodeid, ndiscountrate, cwarehouseid, veditreason, bfreecustflag, "
    + "cfreecustid, ibalanceflag, nsubscription, ccreditnum, nevaluatecarriage, dmakedate, capproveid, dapprovedate, "
    + "fstatus, vnote, vdef1, vdef2, vdef3, vdef4, vdef5, vdef6, vdef7, vdef8, vdef9, vdef10, ccalbodyid, bretinvflag,"
    + "boutendflag,binvoicendflag,breceiptendflag,npreceiverate,npreceivemny,ts,nheadsummny,editionnum"
    + addfieldsql.toString()
    + ")"
    + " values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
    + "?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,? " + addfieldvaluesql.toString() + ")";

 

是由于参数过多?还是说后面进行参数设置控制的时候对非空列使用了setNull方法导致的?

 

 

举报
JackPot
发帖于4年前 2回/979阅
顶部