-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

avaj avaj wrote:
[snip]
java.sql.SQLException: Syntax error or access violation, message from server: "
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 'SELECT id FROM table2 WHERE col = '4028809b:60"

Somehow.. the string was truncated. I tried displaying the string prior to the sql statement and it return the correct value. I think It has to do with the driver's implemetation of ? and preparedStatement.setString() coz when I tried not using ? and setString it passed thru it correctly. However, there are numerous sql statement that makes use of ? and setString. So, changing them all is not a good idea.

MySQL doesn't always return the complete statement during error messages, only the part that is relevant. MySQL 4.0.9 does not support subselects (4.1 does), so the parser is complaining about the SELECT in your IN clause, not the value you are setting.

-Mark

- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+NpH7tvXNTca6JD8RArGqAJ9h4sQB9oShVfz/URrcp5ZZRDzVFgCgxJjR
Z8jTv+pTEQ9HmlBQ7Wj8Oxw=
=UHAm
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to