On Sun, 26 Aug 2001, Sacha Chua wrote:
..
> > $sth = $dbh->prepare ("INSERT INTO Registrants (Name, Desc)
> >     VALUES (?,  ?)");
>
> Oh, spite. You mean I _will_ have to use PreparedStatements in Java?
> They're actually a bit annoying. For some reason, I seem to remember
> not being able to use them more than once, and calling setString for
> each placeholder's... <sigh>
>
> Okay, okay, fine, Best Practice.

Yes. Best practice. There's a Reason(TM) for that which I mentioned
earlier -- there almost always is a 1:1 correspondence between the C API
and placeholders, so it's most efficient.

Not to mention the Principle of Least Astonishment.

I've used the C API's of MySQL and PostgreSQL (and this neat wrapper
library called libsqlora8, since Oracle OCI8 is famously obscure, there's
a whole certification exam -- the OCI8 Certified Developer -- just for
it) and I've noticed this sort of correspondence.


--
Orlando Andico <[EMAIL PROTECTED]>
Mosaic Communications, Inc.

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to