aspose file tools*
The moose likes JDBC 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
Bookmark "Doubt in retrieving data" Watch "Doubt in retrieving data" New topic
Author

Doubt in retrieving data

Arun Kumar Gaddam
Ranch Hand

Joined: May 05, 2007
Posts: 58
DriverManager.getConnection(...........);
System.out.println("connected-->");
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()
banghead
Jetendra Ivaturi
Ranch Hand

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

Regards

Jetendra


SCJP 1.4 & 1.5, SCWCD 1.5. Learn and Let Learn.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in retrieving data
 
Similar Threads
3 Questions
Oracle 10g portal.
error in executing the jsp
casting
getting errors in tomcat server