Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> OCI: How to insert BLOBs with array interface?
Hi,
Is it at all possible to insert BLOBs using the Array Interface?
Today I have an application using the array interface. It works fine but so far I haven't been using BLOBs. I insert 100-200 rows in one server round trip.
Now I want to have one or more colums of type BLOB but I cant see how this can fit into my current application.
I understand that I must use the locator allocated by OCIDescriptorAlloc as a kind of bind handle with OCIBindByPos, which is the one I'm using. But where should I put my data that is to be written to the blob, and must I have a locator for each row AND each column? I mean, the locator allocated by OCIDescriptorAlloc is per column but shouldnt I have a locater per row and column since I'm using the array interface?
If I want to store 100-200 rows using the array interface, where should I put data when building the statement? I guess I must have 100-200 different placeholders for BLOBs when building the statement.
In my current application I store all other data in a buffer using the skip parameter with OCIBindArrayOfStruct but how does this fit into the LOB-types?
Should OCIDescriptorAlloc be called for every new row AND column or only once for each column?
Is it really necessary to execute a INSERT-SELECT statement with EMPTY_BLOB() to actually get the locator value before doing 'real' INSERTs? Should this be done for every row then? If so, I guess this eliminates the use of the array interface.
Im I all wrong or have I completely missed the LOB-interface - or both?
Thanks in advance.
Ole Hansen
Received on Mon Jul 14 2003 - 08:24:28 CDT