i am new to this forum....i have got some problem with conditional SELECT statement while working with JDBC.Following is my code fragment.
the loop (while(rst1.next()) is not working that is it is not retriving values form the table "teacherdata" which is pointed by "project".please help
[edited to add code tags to preserve formatting]
[ April 11, 2005: Message edited by: Jeanne Boyarsky ]
Originally posted by Indranil Guha Roy:
thanks for reply...but if u could be more specific about the syntax of SELECT statement (i.e how to use column names to retrive data), it would have been more helpfull.
Anyway, moving to JDBC...
If your query is not returning any rows, it means you are supplying a "code" that does not exist in the TEACHERDATA table. (Or have I misunderstood your problem?)
In other words, perhaps the problem is with your SQL (and not with your java)
How about removing the space after and before your single qoute from ' input ' field. i.e.