代码如下:- String sql2="insert into caselocus(id,pmid,caseno,flowtache,status,begindate,enddate) values(?,?,?,?,?,?,?)";
- pstmt.setInt(1, i);
- pstmt.setLong(2, pmid);
- pstmt.setString(3, caseno);
- pstmt.setInt(4, huanjie);
- pstmt.setInt(5, 1);
- pstmt.setDate(6,(java.sql.Date) date1);
- pstmt.setDate(7,(java.sql.Date) date1);
复制代码 是报的错!请大侠看看!
java.sql.SQLException: 无效的列索引
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.OraclePreparedStatement.setIntInternal(OraclePreparedStatement.java:3970)
at oracle.jdbc.driver.OraclePreparedStatement.setInt(OraclePreparedStatement.java:3961)
at MadeToCaseLocus.main(MadeToCaseLocus.java:58) |
|