Re: bind variables with jdbc

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Wed, 31 Mar 2004 00:08:29 GMT
Message-ID: <1_nac.37100$gA5.483541_at_attbi_s03>


"Ivan" <ilee_at_bigpond.net.au> wrote in message news:90137e1b.0403301523.55aed707_at_posting.google.com...
> Hi all,
>
> I have an application that is written in servlets that connects to an
> oracle database 8.1.7 via jdbc. My DBA has just notify me that I am
> not using bind variables in my code and was wondering what i'll need
> to change to utilise this.
>
> At the moment i am just opening a connection, making a statement (sql
> query) and executing it to return a resultset. Would i need to change
> all my queries to stored procedures so that bind variables are used or
> is there another way.
>
> thanks all

Use prepared statements. Your DBA is correct. You are going to kill performance and scalability if you don't use bind variables. If you can open the cursor once and just rebind and reexecute. Jim Received on Wed Mar 31 2004 - 02:08:29 CEST

Original text of this message