File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Two instances of PreperedStatment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Two instances of PreperedStatment" Watch "Two instances of PreperedStatment" New topic

Two instances of PreperedStatment

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528

Hi ,

Can i create two PreparedStatements in a class? like this

PreparedStatment pst1 = con.prepareStatement(sqlquery1);

PreparedStatment pst2 = con.prepareStatement(sqlquery2);

If you want something you never had do something which you had never done
Jan Cumps

Joined: Dec 20, 2006
Posts: 2562


OCUP UML fundamental and ITIL foundation
I agree. Here's the link:
subject: Two instances of PreperedStatment
It's not a secret anymore!