pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Rousse <Guillaume.Rousse@univ-reunion.fr>
To: pgsql-interfaces@postgresql.org
Cc: Peter Mount <petermount@it.maidstone.gov.uk>
Subject: RE: Is this usage correct ?
Date: Wed, 19 Apr 2000 16:03:38 +0400
Message-ID: <00041916051801.15060@agathe> (raw)
In-Reply-To: <1B3D5E532D18D311861A00600865478C70C4D0@exchange1.nt.maidstone.gov.uk>
References: <1B3D5E532D18D311861A00600865478C70C4D0@exchange1.nt.maidstone.gov.uk>

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.Rousse@univ-reunion.fr]
> Sent: Wednesday, April 19, 2000 10:47 AM
> To: pgsql-interfaces@postgresql.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 Réunion
> 
> Sleep doesn't exists. Just lack of cafeine.
-- 
Guillaume Rousse
Iremia - Université de la Réunion

Sleep doesn't exists. Just lack of cafeine.



view thread (5+ messages)  latest in thread

Message-ID: <00041916051801.15060@agathe>
Permalink:  ../00041916051801.15060@agathe/
Also on:    postgresql.org/message-id/00041916051801.15060@agathe

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Guillaume.Rousse@univ-reunion.fr, petermount@it.maidstone.gov.uk
  Subject: RE: Is this usage correct ?
  In-Reply-To: <00041916051801.15060@agathe>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox