Exact versions:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0
EFCore 1.1.2
dotConnect 9.4.280 Professional
There is an overload of OracleParameterCollection.Add() that specifies the ObjectTypeName, but it is marked as "for internal use" and ObjectTypeName is not documented.
Here's the relevant part of my code which throws the exception in the last line. I get the same exception if the varray is a function parameter instead of the return value. The code works if I replace "return str.vArr" with "return str.vc2" and "OracleDbType.Array" with "OracleDbType.VarChar".
Code: Select all
create or replace package STR as
subtype vc2 is varchar2(4000);
type vArr is varray(1000000) of vc2;
end STR;
Code: Select all
create or replace function testproc
return str.vArr
is
begin
return null;
end;
Code: Select all
OracleConnection Connection = new OracleConnection();
Connection.ConnectionString = "<data hidden>";
Connection.Open();
OracleCommand command = Connection.CreateCommand();
command.CommandText = "testproc";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("x", OracleDbType.Array, ParameterDirection.ReturnValue);
command.ExecuteNonQuery();