Solved

Binding Arrays of Parameters in ADO and ODBC

Posted on 2002-05-15
4
516 Views
Last Modified: 2008-03-17
In ODBC there was possibility to bind array of values to parameter.
In ODBC documentation we read:

When an application uses array of parameters, there are two different ways this can be executed. One way is for the driver to rely on the array-processing capabilities of the back end, in which case the entire statement with the array of parameters is treated as one atomic unit. Oracle is an example of a data source that supports array processing capabilities.

This is what we really need and we always use for Oracle.
But now we deal with ADO and we find no similar features.
We can create Parameter object and assign a value for it. But how array of values can be assigned?
0
Comment
Question by:Kirill_
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
what is the purpose for doing such?
0
 

Author Comment

by:Kirill_
Comment Utility
We need to insert a huge number of rows into a table.
This is the most effective method since only one statement is executed for many rows, this method eliminates most network overheads, internal Oracle overheads and so on.
Native Oracle SQL*Loader tool use this method (using OCI directly of course)

Another way to make bulky inserts was described in ODBC. This is SQLBulkOperations function. It's work not well with available ODBC drivers, but in theory it should work as follows.
First make select and get recordset, then bind array and make SQLBulkOperations with parameter SQL_ADD.
In ADO it's similar(we suppose) to open Recordset, add records to it and then make Update for Recordset. But the results is dreadful: ADO makes insert for every row, moreover it parse this statement every time before execute it.
0
 
LVL 54

Expert Comment

by:nico5038
Comment Utility

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
Comment Utility
Per recommendation, points refunded and question closed.

Netminder
CS Moderator
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now