Your query is wrongly formatted. Print the final query and execute the same on the MySQL query analyzer.
And this is not the right section to ask JDBC question.
Li Jenny wrote:when i enter number to retrieve that field as below:
select * from ATable where field='123';
it causes sql syntax error
why?
This SQL is syntactically correct. The problem is the SQL query which gets formatted when you assign the parameter in JDBC code. I repeat, check the resultant query from JDBC code. The problem is there.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.