Re:如何修改(error:Parameter index out of range)
[Re:huangbb12345]
jimwayne
發文: 220
積分: 0
於 2014-02-07 09:52
InsertDB Exception :java.sql.SQLException: Parameter index out of range (0 < 1 ). Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at db.jdbcmysql2.main(jdbcmysql2.java:185)
錯誤訊息解讀~ 錯誤發生在 jdbcmysql2.java 的第 185 行 錯誤原因是因為 java.lang.ArrayIndexOutOfBoundsException,也就是指定的索引不合法 不合法的原因是 Parameter index out of range (0 < 1 ),即索引最小的允許值是 1,但程式給了 0。