ODP .Net
Muhammad Masood Qaisar, August 06, 2009 - 9:40 am UTC
Subject: 'Array is not a one-dimensional' Error When Passing Table of Records as Input Parameter Using PL/SQL Associative Arrays
Doc ID: 286001.1 Type: PROBLEM
Modified Date: 30-NOV-2004 Status: PUBLISHED
The information in this document applies to:
Oracle Data Provider for .NET - Version: 9.2.0.4
Microsoft Windows 2000
Symptoms
A C# application is passing a PL/SQL table of records as an input parameter to a stored procedure using the Oracle Data Provider for .NET (ODP.NET) PL/SQL Associative Arrays feature. Execution of the code results in the following error:
'Array is not a one-dimensional'
Cause
ODP.NET does not support binding a table of records (multidimensional array) as this is a limitation of the Oracle Call Interface API.
Fix
Fix 1: ODP.NET does support PL/SQL Associative arrays in which you can pass an array of single scalar types.
For example, you can declare and pass the following for each column in your table.
TYPE AssocArrayVarchar2_t is table of VARCHAR(20) index by BINARY_INTEGER;
August 06, 2009 - 10:45 am UTC
I do see that you, well, had already answered your question using support and already knew the answer was "it cannot be done" - so thanks for asking me to verify that "it cannot be done". brilliant.
Muhammad Masood Qaisar, August 06, 2009 - 11:00 am UTC
sir it is a 30-NOV-2004 post (Oracle Data Provider for .NET - Version: 9.2.0.4
). i want to confirm that it is still unsportted in newer version of ODP .net.
August 06, 2009 - 11:07 am UTC
It is unsupported in every language - I said "However, what you have is an index by table of records - and PLSQL records are not accessible outside of PLSQL. "
OO4O
A reader, March 23, 2011 - 9:18 pm UTC
Hi Tom,
I am using oo4o from a DotNet application and want to record over 100 records to a table containing 20 columns, what is the best way to do this.
Thanks