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 Relational Databases and the fly likes PreparedStatement query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "PreparedStatement query" Watch "PreparedStatement query" New topic
Author

PreparedStatement query

wrushasen dakhane
Ranch Hand

Joined: Sep 25, 2006
Posts: 47
Hi,

I have 2 questions...

1. Where does the compiled preparedStatement stays?


2. When we are running thr the ResultSet i.e rs.next and the database connectivity is lost how the resultset work will it display the remaining records or it will start again?


Best Regards,
Wrushu


SCJP 1.4, SCWCD 1.4
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31808
    
195

Wrushu,
1) In Java's memory from the driver. Note there is also a database execution plan which is stored on the database.
2) Usually it will throw an exception forcing you to handle it. Most people handle it by starting over, but you could write some code for the re-query to start where you left off.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PreparedStatement query