Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes Doubt in retrieving data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Doubt in retrieving data" Watch "Doubt in retrieving data" New topic

Doubt in retrieving data

Arun Kumar Gaddam
Ranch Hand

Joined: May 05, 2007
Posts: 58
String check="Arun";
String vsql="select * from phoneproj where cont_name= __________";
Statement stmt= con.createStatement();
ResultSet rs= stmt.executeQuery(vsql);

Now what can i add in the blank to retrieve data whose contact name is Arun.
i can't able to write .....any one please help......thanks in advance
javascript: x()
Jetendra Ivaturi
Ranch Hand

Joined: Feb 08, 2007
Posts: 159
"select * from phoneproj where cont_name='"+check+"'";



SCJP 1.4 & 1.5, SCWCD 1.5. Learn and Let Learn.
I agree. Here's the link:
subject: Doubt in retrieving data
It's not a secret anymore!