Solved

Binding Arrays of Parameters in ADO and ODBC

Posted on 2002-05-15
4
519 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
ID: 7011547
what is the purpose for doing such?
0
 

Author Comment

by:Kirill_
ID: 7011649
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
ID: 7265785

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
ID: 7296531
Per recommendation, points refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spx for moving values to new table 5 70
#deleted rowsc access 2010 backend 4 48
ORA-12560: TNS:protocol adapter error 8 89
Documenting Data flow 4 6
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
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…

861 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

30 Experts available now in Live!

Get 1:1 Help Now