Re: Handling String date format "0000-00-00 00:00:00" removed in latest version???
Posted by: Mark Matthews
Date: February 23, 2005 08:01AM

Simon Haldon wrote:
> The other change between connector J 3.0 and 3.1
> versions seems to be a failure to run a query
> using the LIMIT keyword with a placeholder
> parameter. Can anyone confirm that this is not
> supported any more or whether there is some
> environmental variable I need to change.
>
> E.g.
>
> a_query.append("SELECT x from y where z=? ")
> a_query.append(" LIMIT ? ")
>
> This now gives an SQL syntax error under 3.1.6+,
> but runs fine under 3.0.x.
> I couldn't find any relevant reference to LIMIT in
> the changelog.

Simon,

You need to use 3.1.7, or turn off server-side prepared statements. The driver itself per-se didn't change. The server now supports prepared statements, but doesn't let you use '?' as a parameter.

Connector/J 3.1.7 automatically scans for LIMIT clauses, and if present, doesn't use a server-side prepared statement.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.