1 message in com.mysql.lists.javaConnector/J 3.1.16 LIMIT Exception
FromSent OnAttachments
Axel Muench11 Jan 2005 02:34 
Subject:Connector/J 3.1.16 LIMIT Exception
From:Axel Muench (axel@spectodesign.com)
Date:01/11/2005 02:34:02 AM
List:com.mysql.lists.java

Hi,

Since we upgraded our staging server from Connector/J 3.0.14+ to Connector/J 3.1.16 ( on mysql 4.1.17) we receive for any SQL PreparedStatements ending in "LIMIT ?,?" a java.sql.SQLException:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,?' at line 1

Example: private static final String PRODUCT_BY_RANGE_LIMIT = "SELECT * FROM Product LIMIT ?,?"; ~~~~cut~~~~~~ prepStmt.setInt(1, index); prepStmt.setInt(1, range); ~~~~cut~~~~~~

Anybody else came across this problem?

Thanks,

Axel