File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes prepareStatement() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "prepareStatement()" Watch "prepareStatement()" New topic
Author

prepareStatement()

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
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

Joined: May 04, 2001
Posts: 103
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).]


chandran..
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: prepareStatement()