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

Home -> Community -> Usenet -> c.d.o.server -> Re: OCI, binding and memory usage

Re: OCI, binding and memory usage

From: Adrian Capp <adrian.capp_at_blueyonder.co.uk>
Date: Tue, 9 Jul 2002 21:23:45 +0000 (UTC)
Message-ID: <agfk90$dvi$1@helle.btinternet.com>


Check out the OTL at http://members.fortunecity.com/skuchin/home.htm

I find it makes using OCI a whole lot more convient.

Adrian

"Eric" <bytewarrior2000_at_yahoo.com> wrote in message news:497b38b.0207080731.3124f385_at_posting.google.com...
> I'm a relative newcomer to OCI 8 programming. I am confused by some
> of the OCI documentation, specifically related to OCIBindByPos.
>
> What I want to do is this:
> - prepare a PL/SQL statement once
> - bind input and output to program variables; for each execution of
> the statement, the location of the bind variables may be different
> - execute the statement many times
>
> It's unclear what happens with regard to allocation and deallocation
> of the *bindpp variables. The documentation implies that each time
> OCIBindByPos is called, a bindpp struct will be allocated, and that
> once the statement handle is freed, all associated bindpp structs are
> also freed.
>
> Assume I have one variable to bind in the statement, and I need to
> execute the statement 1 million times, storing the result in different
> places each time (or at least, unpredictable memory locations each
> time, probably some overlap). So I call OCIBindByPos 1 million
> times...does this mean OCI will allocate the bindpp 1 million times?
> And is OCIHandleFree really smart enough to free the bindpp pointers
> for all 1 million cases, or just the last one?
>
> Very confusing. All I want to do is really change the location of
> each parameter in memory, and nothing else. The statement remains the
> same, the parameters remain the same, the data types remain the same.
>
> Thanks
Received on Tue Jul 09 2002 - 16:23:45 CDT

Original text of this message

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