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
Subject: Is this usage correct ?
Date: Wed, 19 Apr 2000 13:47:21 +0400
Message-ID: <00041913520100.08718@agathe> (raw)

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.



view thread (5+ messages)  latest in thread

Message-ID: <00041913520100.08718@agathe>
Permalink:  ../00041913520100.08718@agathe/
Also on:    postgresql.org/message-id/00041913520100.08718@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
  Subject: Re: Is this usage correct ?
  In-Reply-To: <00041913520100.08718@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