🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1479

PreparedStatements

#1479
From: TBerry
Date: Mon, 17 Dec 2001 20:16
17 lines
1639 bytes
I have two questions on PreparedStatements:

1. For basic queries (e.g. SELECT a, b, c, d FROM table Z ORDER BY a),
is there any benefit to making this a PreparedStatement versus a
Statement?

2. My web app. is an interactive GUI front end to a database. SELECT,
INSERT and UPDATE queries are routinely executed. I have not yet
implemented connection pooling but will be. Regarding executing a
PreparedStatement, after the execution, do I recreate the statement with
new values (if any), each time? That's what the documentation seems to
imply. And since I've no connection pooling yet, I'm closing each
Statement/PreparedStatement when it's completed. If it matters I'm using
Microsoft's type 4 JDBC driver.

Thank you
Tom Berry
Technical Details
Message-ID: <3C1E52A9.80F240C@vhb.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!sfo2-feed1.news.digex.net!intermedia!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,68fc473350be3803,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-12-17 12:18:35 PST
Message-ID: <3C1E52A9.80F240C@vhb.com>
Date: Mon, 17 Dec 2001 15:16:41 -0500
From: TBerry <tberry@vhb.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: PreparedStatements
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 204.243.174.175
X-Trace: dnews 1008620146 204.243.174.175 (17 Dec 2001 12:15:46 -0800)
Lines: 18
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!sfo2-feed1.news.digex.net!intermedia!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews