473,473 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2854

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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.