473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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

Jul 19 '05 #1
0 2840

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ole Hansen | last post by:
Hi, I have a working application inserting rows to a table using the array interface. Now I want to insert BLOBs as well but OCIStmtExecute crashes when executed with BLOBs. For BLOB types I...
0
by: Red_Viking | last post by:
Hello, in Oracle Enterprise Manger Console i declared an array-type. Then i created a table which uses this type. How can i now insert an array to this table? Thanks in advance!
0
by: Tuhin Kumar | last post by:
Hi, I would like to know how to perform the bulk insertion of binary data using the OCI. Thanks, Tuhin
7
by: james | last post by:
Hi, I am trying to insert a record into a database table, one field of which is a byte array. Using the below: Byte imgArr; .... <code to put image into imgArr>
3
by: amolchopra | last post by:
Hello, I am using C API for MySql. From my application, I am supposed to insert a 2D array into the database table. The array can be of size 1000000 * 20. (1 million by 20). So, to accomodate this...
0
by: Ole Hansen | last post by:
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...
5
by: John Doe | last post by:
Hi, I have a static array of struct defined like this : CViewMgr::ViewInfo g_ViewInfo = { { EMainView, ECreateOnce, IDR_MAINFRAME, RUNTIME_CLASS(CMainView), NULL,0, 0 }, {...
1
by: Scarlett007 | last post by:
Dear all! I've looked through your forum but i couldn't find what i exactly need. I have an array (actually it's fields from CSV -file). I insert them into temporary table and then insert data from...
1
by: gamepart | last post by:
I have an array $product_array, and when I use print_r($product_array);. The array shows like this Array ( => Array ( => P00100 => Edina => $20.00 )
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.