Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01

Home

Book List

Contents

Master Index

Feedback

Array Processing

OO4O supports an array interface to an Oracle database through OraParamArray object. The array interface enables the transfer of bulk of data in single network trip. This is especially helpful while processing a PL/SQL or SQL statement via the ExecuteSQL or CreateSQL method. For example, in order to insert 100 rows into remote database without array processing, ExecuteSQL/CreateSQL must be called for 100 times, which in turn make 100 network trips. For example:

For I = 1 to 100

OraParameter("EMPNO").Value = xxxx

OraParameter("ENAME").Value = 'yyyy'

OraParameter("DEPTNO").Value = zz

OraDatabase.ExecuteSql("insert into emp values

(:EMPNO,:ENAME,:DEPTNO)");

Next I

The following example make use of arrays and do only one network trip.

' :ENAMEARR,:EMPNOARR,:DEPTNOARR are parameter arrays

For I = 1 to 100

OraParameter("EMPNOARR").Put_Value xxxx, I

OraParameter("ENAMEARR").Put_Value 'yyyy' ,I

OraParameter("DEPTNOARR").Put_Value zz, I

Next I

'Now call the ExecuteSQL only once

OraDatabase.ExecuteSql("insert into emp

values(:EMPNOARR, :ENAMEARR, :DEPTNOARR)");

For more information on using arrays , see the OraParamArray object.


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents