Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Re: bind variables with jdbc

Re: bind variables with jdbc

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Sat, 03 Apr 2004 13:27:27 GMT
Message-ID: <3Zybc.172028$po.981790@attbi_s52>

"rshome" <rshome_at_ntlworld.com> wrote in message news:8e251e1f.0404020840.382ac855_at_posting.google.com...
> A compromise that works well is to get the DBA to change the
> CURSOR_SHARING instance parameter from EXACT to FORCE. This pretty
> much simulates the effects of using bind variables without having to
> do changes to the application code.
> Not quite as efficient as using bind variables, but works well.
>
> "Eugene Staten" <estaten_at_NOSPAMPLZcox.net> wrote in message
news:<106kiotevtlem53_at_news.supernews.com>...
> > Use prepared statments like Jim explained.
> > It would not hurt to place some of your more common queries and inserts
into
> > Stored Procedures.
> >
> > SPs help with big queries updates, or inserts.
> >
> > "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

ONLY USE THIS AS A LAST RESORT. THE DEVELOPER'S SHOULD FIX THEIR CODE. YOU ARE INTRODUCING A LOT OF OTHER PROBLEMS IF YOU DO THIS. His DBA is correct. Use bind variables.
Jim Received on Sat Apr 03 2004 - 07:27:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US