Sorry for me being vague. i try to input value to a textbox and based on that ,i want to get rows from the table..please help me..i am finding it difficult to use variable in a select statement...
cursor does not return any values...no output produced on the screen.how do I use a variable???
(however if i supply the value directly,it is working and fine and comes up with data)
thanks in advance
Joined: Mar 22, 2005
You're passing the literal value "nn" to the query, instead of the value of the variable "nn". Instead of this:
try something like this:
That's what the javadocs of that method mean when they talk about using "?". It's similar to using a PreparedStatement in JDBC. Since you're using "like", the value of "nn" should most likely have % characters at the beginning and end, as in
Joined: Jul 20, 2012
thanks a lot,Ulf Dittmer....I have been struck with this 6 to 7 hours..was not able to solve it.
now it works
I went through net..could not find a solution.Is there any book that you will recommend?