dbTalk Databases Forums  

Need some info about SQLBindCol and Stringbuffers

comp.database.oracle comp.database.oracle


Discuss Need some info about SQLBindCol and Stringbuffers in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Georg Tsakumagos
 
Posts: n/a

Default Need some info about SQLBindCol and Stringbuffers - 03-05-2004 , 03:35 AM






I've read the odbc doc's about but i don't find what i search.

I want to insert N-rows at once with SQLBulkOperations.
To achieve this i've to build an Buffer for the Data.
There are to ways to build such buffer.

1. Bind an buffer to a row
2. Bind an buffer to a column

I would like to build buffers for each column. In this case this are
strings. So ther was one solution im not happy with. The buffers has
to be a linear memoryblock where each column has a fixed lenght. I
would like to build an buffer wich contains pointer to the Data for
each column.

ODBC Way:
---------

3 columns of a fixed lenght 8

contiguous block of 21 bytes

1 21
Quote:
1. Row | 2. Row | 3. Row |
-------------------------------------------------
1|2|3|4|5|6|7|8|1|2|3|4|5|6|7|8|1|2|3|4|5|6|7|8|

My like to do Way:
------------------

3 columns of a fixed lenght 8

contiguous block of 12 bytes (3 dword pointer)
3 blocks of 8 bytes for each row.

1 12
Quote:
1. Row | 2. Row | 3. Row |
----------------------------
0x0000 | 0x0008 | 0x0010 |
1. Block
0x0000 -> |1|2|3|4|5|6|7|8|

2. Block
0x0008 -> |1|2|3|4|5|6|7|8|

3. Block
0x0010 -> |1|2|3|4|5|6|7|8|


Ok this is only an example. I'd like to insert 1000 records. and i
don't whant to allocate such big buffers at one peace.

Has anyone experiences with SQLBulkOperations?
Is there a proofed rowcount for inserts.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.