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.