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

Home -> Community -> Usenet -> c.d.o.misc -> OCI: Example using array interface with LOBs.

OCI: Example using array interface with LOBs.

From: Ole Hansen <rm_oha_rm_at_city.dk>
Date: Fri, 29 Aug 2003 10:47:27 +0200
Message-ID: <3f4f1436$0$32528$edfadb0f@dread16.news.tele.dk>


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 with the array interface.

Now I want to have one or more colums per row 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.

If I have say 100 rows with 2 BLOB columns each, do I need 200 LobLocators then, or does the array interface handle this? But where should I store data that is to be inserted if I dont need 200 LobLocators?

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?

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 Fri Aug 29 2003 - 03:47:27 CDT

Original text of this message

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