Skip site navigation (1) Skip section navigation (2)

RE: Is this usage correct ?

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Guillaume Rousse'" <Guillaume(dot)Rousse(at)univ-reunion(dot)fr>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: Is this usage correct ?
Date: 2000-04-19 10:26:43
Message-ID: 1B3D5E532D18D311861A00600865478C70C4D0@exchange1.nt.maidstone.gov.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
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 Réunion

Sleep doesn't exists. Just lack of cafeine.

Responses

pgsql-interfaces by date

Next:From: Mirek HankusDate: 2000-04-19 11:39:06
Subject: ODBC with fields defined as numeric(14,2)
Previous:From: Guillaume RousseDate: 2000-04-19 09:47:21
Subject: Is this usage correct ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group