Monday, August 17, 2009

Incorrect arguments to mysql_stmt_execute

When we use MySQL connector mysql-connector-java-5.0.4-bin.jar with PreparedStatement contains more number of columns we may get the following Exception
java.sql.SQLException: Incorrect arguments to mysql_stmt_execute
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)

To fix this issue we have to use mysql-connector-java-5.1.8-bin.jar

No comments: