| Author |
PreparedStatement Error
|
karthik swamy
Ranch Hand
Joined: Mar 14, 2011
Posts: 37
|
|
hello everyone,
just view this SQL queryi.e
This is what i am getting from database :
then in jsp I am replacing like this :
then the query looks like this :
then i am binding it with prepareStatement
if i need to set String only for org_id then it works
but if then query comes like this:
then code the java code fails to work...
so please suggest me any solutions for this...
Thanks and regards,
Karthik Swamy
|
 |
Roberto Perillo
Bartender
Joined: Dec 28, 2007
Posts: 2212
|
|
|
Champ, since this is more related to JDBC, I'm moving this to the JDBC forum.
|
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2329
|
|
Karthik, please TellTheDetails (see especially ItDoesntWorkIsUseless).
Post the exception you're experiencing, including stack trace. Or, if you're not getting an exception, describe the output the code generates and explain why is it wrong.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
In that code with the cryptically-named variables "a" and "b", the value of "b" is always zero. Since you made it a variable, perhaps that wasn't what you intended.
|
 |
 |
|
|
subject: PreparedStatement Error
|
|
|