List:MySQL and Java« Previous MessageNext Message »
From:Harry Rickards Date:June 13 2009 8:41pm
Subject:Re: SQL Syntax Error '????????????????'
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/13/09 13:27, Ted Yu wrote:
> Are all fields in customers table strings ?
> 
> --- On Sat, 6/13/09, Harry Rickards <hrickards@stripped> wrote:
> 
>> From: Harry Rickards <hrickards@stripped>
>> Subject: SQL Syntax Error '????????????????'
>> To: java@stripped
>> Date: Saturday, June 13, 2009, 1:28 AM
> I've written some sample code in Java that connects to
> localhost using
> the MySQL JDBC. I've tried multiple variations of the code,
> but even
> when using the proper code from MySQL's website, I get the
> following error:
> 
> 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
> SQLState: 42000
> VendorError: 1064
> 
> I don't know where the question marks are coming from, as
> there aren't
> even any question marks in the code. The code is at
> http://github.com/l33tmyst/dtelectrics/blob/master/src/connect.java,
> and
> if it's any help I'm using Eclipse 3.4.2 on Debian Sid. The
> java version is:
> 
> hrickards <at> siddy:~$ java -version
> java version "1.6.0_14"
> Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
> Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode,
> sharing)
> 
> and the kernel version is 2.6.26-1-486. I've tried STFW,
> but I can't
> find anyone with a similar problem.
> 
>>
>>

Yes. I've actually fixed the problem know. All I did was swap a few
braces around, and now it seems to work.

- -- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/java?unsub=1
>>
>>

- -- 
Many thanks
Harry Rickards (GPG Key ID:58449F6F)

- -----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT/GCM/GCS/GCC/GIT/GM d? s: a? C++++ UL++++ P- L+++ E--- W+++ N o K+
w--- O- M- V- PS+  PE Y+ PGP++ t 5 X R tv-- b+++ DI D---- G e* h! !r y?
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAkoz8uAACgkQ+9DWHFhEn28IIQQAhqDQa+U7qZ8VgWPH6C3zZPHP
0w11yTuhXn2q7xSOup/Nnz3DeWqvQWWuGyHtSNprIq1gvPe7cxRMoreTIiPQgmbk
LoFuW7z/B0wedODzvurffEWTaISq6AO3c2raCIaHgGOmzSNO88XlJC0fWlM5PGIG
75TN+X+4dbaVtVo3HNM=
=l5gn
-----END PGP SIGNATURE-----
Thread
SQL Syntax Error '????????????????'Harry Rickards13 Jun
Re: SQL Syntax Error '????????????????'Harry Rickards13 Jun