Where is PreparedStatement stored ?

Hi,

I have a question which I need concrete answer. We know that PreparedStatements are pre-compiled statment. It means that it

must be stored somewhere . I want to know where it is stored. More specifically suppose I am using thin driver and database Oracle. If I change ie. add or remove parameters for the prepared statement, how it is compiled internally. Please provide me specific answer. Beside when it is compiled once at the compilation of java files or compilation of SQL files ?

[508 byte] By [DebadattaMishraa] at [2007-11-27 11:17:46]
# 1

> Hi,

>

> I have a question which I need concrete answer. We

> know that PreparedStatements are pre-compiled

> statment. It means that it

> must be stored somewhere . I want to know where it is

> stored.

<concrete>

Driver specific.

</concrete>

> More specifically suppose I am using thin

> driver and database Oracle. If I change ie. add or

> remove parameters for the prepared statement, how it

> is compiled internally. Please provide me specific

> answer. Beside when it is compiled once at the

> compilation of java files or compilation of SQL files

> ?

Compilation of SQL files? WTF?

dwga at 2007-7-29 14:26:52 > top of Java-index,Java Essentials,New To Java...
# 2

> Beside when it is compiled once at the

> compilation of java files or compilation of SQL files

> ?

It's not compiled when you compile your Java files. It's copmiled sometime between when you call prepareStatement and when you call execute, though it's up to the driver or the DB to decide exactly when.

jverda at 2007-7-29 14:26:52 > top of Java-index,Java Essentials,New To Java...