Re: Difference between Statement and preparedStatement (for SQL databases) ?
From: John B. Matthews (nospam_at_nospam.com)
Date: 10/16/04
- Next message: VisionSet: "Re: Difference between Statement and preparedStatement (for SQL databases) ?"
- Previous message: Ken Philips: "Difference between Statement and preparedStatement (for SQL databases) ?"
- In reply to: Ken Philips: "Difference between Statement and preparedStatement (for SQL databases) ?"
- Next in thread: VisionSet: "Re: Difference between Statement and preparedStatement (for SQL databases) ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 16 Oct 2004 13:32:53 GMT
In article <ckqvcr$kbm$05$1@news.t-online.com>,
kennyb@yahoo.ca (Ken Philips) wrote:
> Sometimes I can see pure Statement declaration for accessing SQL databases
> others use preparedStatements.
>
> What is the difference?
>
> Ken
A Statement is usually parsed and executed each time it is submitted
to the database; a PreparedStatement may be parsed once and executed
repeatedly with different parameters. The latter offers an
opportunity for optimization that the former cannot.
-- John ---- jmatthews at wright dot edu www dot wright dot edu/~john.matthews/
- Next message: VisionSet: "Re: Difference between Statement and preparedStatement (for SQL databases) ?"
- Previous message: Ken Philips: "Difference between Statement and preparedStatement (for SQL databases) ?"
- In reply to: Ken Philips: "Difference between Statement and preparedStatement (for SQL databases) ?"
- Next in thread: VisionSet: "Re: Difference between Statement and preparedStatement (for SQL databases) ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]