I am getting this when I am fetching data from database (select query) through a java program, but the strange part is that, the same query works perfectly when I run it in SQL prompt...
It is some syntax problem in your query of some sort but it is impossible to say without seeing it. Please post your Java code where prepare/create/execute this statement.
It is some syntax problem in your query of some sort but it is impossible to say without seeing it. Please post your Java code where prepare/create/execute this statement.
But the same query is working fine, when I copy it, paste it into SQL prompt and run it...
Originally posted by Paul Clapham: Because it is nothing to do with the particular SQL query. Every time I have had that error, it is because I did things in the wrong order in my code.
It would certainly be helpful if you posted the code. Or we could sit here and speculate.
Paul, I don't have code at this time, otherwise I would have posted it before....
Yes, But I am doing everything in right order: 1] Making connection. 2] Making statement. 3] Executing statement.
Everywhere I am following the same sequence and working fine...
You are also right that without code it will only be a guess...