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 Prepared Statement 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 "Prepared Statement" Watch "Prepared Statement" New topic

Prepared Statement

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
Let's assume we are using oracle driver, How the JDBC driver knows
that the given Prepared statement is already parsed ?.

Will it take some status from the "Oracle DB Shared Pool " for that
Prepared statement . (Or ) within the JDBC driver it is mantaining some
Pool for the Prepared Statements ?.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

It can be different depending on the database, but from waht I've heard, Oracle matches the (case-sensitive) String. As long as you pass the same String it will be matched by the database. If you pass a slightly different string... it will be a different PreparedStatement.
I agree. Here's the link:
subject: Prepared Statement
It's not a secret anymore!