Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: question on shared cursors with VB
no that won't work efficiently (that is it won't use bind variables); you
will keep reparsing the statement everytime you execute it. Use parameters
and that will prevent reparsing.
Jim
"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message
news:8p5i9l$7kt$1_at_soap.pipex.net...
> I'm fairly sure that the driver will do it for you if you use standard vb
> variables
>
> eg
> .....
> state_str = 'CA'
> query_str = "select city from p_city where state = " & State_str
> ...
>
> etc
> HTH
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
>
> "d" <dreyz_at_hotmail.com> wrote in message
news:OUx7UtqFAHA.322_at_cpmsnbbsa09...
> > Hi Folks,
> >
> > The environement is VB 6.0, Orace 8.1.6
> >
> > Can someone tell me how to issue sql commands from a VB component using
bind
> > variables rather than weaving in the query parameter values in the
command
> > itself.
> > e.g.
> > variable state = 'CA'
> > query_str = "select city from p_city where state = :state" and execute
the
> > query_str binding the variable state to the call
> > instead of
> > query_str = "select city from p_city where state = 'CA' "
> >
> > Any help is appreciated.
> > Thanks,
> > Drey.
> >
> >
> >
> >
> >
>
>
Received on Wed Sep 06 2000 - 21:43:24 CDT
![]() |
![]() |