By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,321 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,321 IT Pros & Developers. It's quick & easy.

OCI: How to insert BLOBs with array interface?

P: n/a

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

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

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.