Solved

Binding Arrays of Parameters in ADO and ODBC

Posted on 2002-05-15
4
521 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
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…

730 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