From: | Guillaume Rousse <Guillaume(dot)Rousse(at)univ-reunion(dot)fr> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Cc: | Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk> |
Subject: | RE: Is this usage correct ? |
Date: | 2000-04-19 12:03:38 |
Message-ID: | 00041916051801.15060@agathe |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Just as i use PreparedStatement elsewhere in the code, i'd like to use the same
pattern.
Le mer, 19 avr 2000, Peter Mount a crit :
> In theory it would be ok, but as PreparedStatement extends Statement,
> why cause the extra overhead and just use Statement?
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough Council.
>
>
>
> -----Original Message-----
> From: Guillaume Rousse [mailto:Guillaume(dot)Rousse(at)univ-reunion(dot)fr]
> Sent: Wednesday, April 19, 2000 10:47 AM
> To: pgsql-interfaces(at)postgresql(dot)org
> Subject: [INTERFACES] Is this usage correct ?
>
>
> Is it correct to use a preparedStatement with no variable element, as
> this:
> PreparedStatement stmp=conn.prepareStatement("delete from table where
> oid="+oid);
> stmt.excuteUpdate();
>
> Or is it mandatory to use :
> PreparedStatement stmp=conn.prepareStatement("delete from table where
> oid=?");
> stmt.setInt(1,oid);
> stmt.excuteUpdate();
>
> --
> Guillaume Rousse
> Iremia - Universit de la Runion
>
> Sleep doesn't exists. Just lack of cafeine.
--
Guillaume Rousse
Iremia - Universit de la Runion
Sleep doesn't exists. Just lack of cafeine.
From | Date | Subject | |
---|---|---|---|
Next Message | Gene Sokolov | 2000-04-19 13:38:45 | ODBC not reporting RI violations. |
Previous Message | Mirek Hankus | 2000-04-19 11:39:06 | ODBC with fields defined as numeric(14,2) |