ODBC Executing Prepared STMT Multiple Times

Go back to: Code Samples
PreparedStatement ps = conn.prepareStatement(
   "INSERT INTO employees VALUES (?, ?, ?)");
for (n = 0; n < 100; n++) {
   ps.setString(name[n]);
   ps.setLong(id[n]);
   ps.setInt(salary[n]);
   ps.executeUpdate();
}




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.