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 -> OCI, binding and memory usage

OCI, binding and memory usage

From: Eric <bytewarrior2000_at_yahoo.com>
Date: 8 Jul 2002 08:31:28 -0700
Message-ID: <497b38b.0207080731.3124f385@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

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 Mon Jul 08 2002 - 10:31:28 CDT

Original text of this message

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