aspose file tools*
The moose likes JDBC and the fly likes Adding parameter on select statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Adding parameter on select statement" Watch "Adding parameter on select statement" New topic
Author

Adding parameter on select statement

Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

Hi Guys I just want to ask how can i put my parameter to my quere please see the code below





Best Regards,
anirudh jagithyala
Ranch Hand

Joined: Dec 07, 2010
Posts: 41
you can also try the concept of prepared statement



i am not clear with the question, might be this would help....
Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

anirudh jagithyala wrote:you can also try the concept of prepared statement



i am not clear with the question, might be this would help....


Thank you for your quick reply but im getting error with the parenthesis. Kinda new with this stuff

Regards
anirudh jagithyala
Ranch Hand

Joined: Dec 07, 2010
Posts: 41
hey Caleb,
where are you getting the errors.... Isit for your code or the code which i gave
Did you try the code with prepared statement..

please ellaborate
Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

anirudh jagithyala wrote:hey Caleb,
where are you getting the errors.... Isit for your code or the code which i gave
Did you try the code with prepared statement..

please ellaborate


I tried your code but the problem is java is asking me to put another parenthesis at the end of the PreparedStatement (see the bold parenthesis below.) Java is telling me that i need to put another one of that at the end



Thanks again
Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

Hey buddy thank you for your help I got the idea and it is working ok now.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

Caleb Jhay wrote:
anirudh jagithyala wrote:hey Caleb,
where are you getting the errors.... Isit for your code or the code which i gave
Did you try the code with prepared statement..

please ellaborate


I tried your code but the problem is java is asking me to put another parenthesis at the end of the PreparedStatement (see the bold parenthesis below.) Java is telling me that i need to put another one of that at the end



Thanks again


Don't wrap quotes around a parameter:



OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding parameter on select statement