On 2/18/06, Teg <[EMAIL PROTECTED]> wrote:
>
>
> I always assume the prepared statement were transitory. I typically
> create them in a function, use them than delete them. Is there a
> discussion of their life span somewhere? I typically have DB's that
> never change schema after their initial creation. How reliable is it
> to say, create the prepared statement in a constructor and use them
> for the life of the class?
>
>
>
Teg,

Saving a prepared statement works well.

In my application, which also uses a static schema, we prepare a SQL
statement the first time it is executed, and save the prepared statemet in a
cache. The next time it is executed, the previously prepared statement is
pulled from the cache and re-executed.

HTH
Dennis Cote

Reply via email to