Troubleshooting Case1a

Go back to: Code Samples
PreparedStatement pstmt = con.prepareStatement(
"SELECT fname, lname, crimes, convictions, laddress, photo " +
    "FROM FBI_most_wanted WHERE state=?");
pstmt.setString(1, "NC");
ResultSet rs = pstmt.executeQuery ();
 
// Display all rows
while (rs.next()) {
// Retrieve information and display the contents
}
rs.close();




Like what you see? Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis

Book Content Copyright © 2009 by Prentice Hall PTR. All rights reserved. | Corporate Sponsor DataDirect Technologies.