Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

prepareStatement()

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have another code snippet that I don't quite understand.
PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO" CATALOGUE(title, lead_actor, lead_actress, type, release_date) VALUES(?, ?, ?, ?, ?)");
Which method does the above prepareStament() fall into, prepareStatement(String sql) or pepareStatement(String sql, int resultSetType, int resultSetConcurrency)?
 
Raajesh Chandran
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi park!!
I'm confused by U'r coding.Is it working.
PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO" CATALOGUE(title, lead_actor, lead_actress, type, release_date) VALUES(?, ?, ?, ?, ?)");
what the second Quotes doing there?

I done like this.How that one is working???
PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO CATALOGUE(title, lead_actor, lead_actress, type, release_date) VALUES(?, ?, ?, ?, ?)");


chandran


[This message has been edited by Raajesh Chandran (edited May 18, 2001).]
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know, so am I. This is a sloppy code from wrox's Professional Java Server Programming J2EE. The " right before CATALOGUE should not be there at all. Very misleading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic