Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> OO4O - Excel to Oracle - Array Processing

OO4O - Excel to Oracle - Array Processing

From: Paul <mrpaulwass_at_hotmail.com>
Date: 29 Jul 2002 11:29:07 -0700
Message-ID: <bad8cee.0207291029.38cad56d@posting.google.com>


Is there a way to pass a multidimension array back and forth between Excel and Oracle instead of using a separate AddTable for every column? Below is the example from the documentation.

Thanks,

Paul

Dim OraSession As OraSession
Dim OraDatabase As OraDatabase
Dim EmpnoArray As OraParamArray
Dim EnameArray As OraParamArray
Set OraSession = CreateObject("OracleInProcServer.XOraSession") Set OraDatabase = OraSession.OpenDatabase("exampledb", "scott/tiger", 0&)
OraDatabase.Parameters.Add "ArraySize", 3, ORAPARM_INPUT OraDatabase.Parameters.AddTable "EMPNOS", ORAPARM_INPUT, ORATYPE_NUMBER ,3,22
OraDatabase.Parameters.AddTable "ENAMES", ORAPARM_OUTPUT,ORATYPE_VARCHAR2,3,10
Set EmpnoArray = OraDatabase.Parameters("EMPNOS") Set EnameArray = OraDatabase.Parameters("ENAMES")
'Initialize the newly created input parameter table EMPNOS

EmpnoArray(0) = 7698 
EmpnoArray(1) = 7782 
EmpnoArray(2) = 7654 

'Execute the PLSQL package

OraDatabase.ExecuteSQL ("Begin
Employee.GetEmpNamesInArray(:ArraySize,:EMPNOS,:ENAMES); End;")
'Print out Enames
MsgBox EnameArray(0) 
MsgBox EnameArray(1) 
MsgBox EnameArray(2)
Received on Mon Jul 29 2002 - 13:29:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US