Exception when function with Table return type is invoked
Posted: Fri 30 Jul 2010 12:09
Hi, i couldn't invoke function which return Table (array).
Exception is always raised either I use ADO.net or Linq
Is it bug or i just don't understand something?
SQL :
CREATE OR REPLACE FUNCTION GetTicketMainFake(niClass IN dd.reference) RETURN dd.ClobType_Nested
IS
arr dd.ClobType_Nested := dd.ClobType_Nested();
BEGIN
RETURN arr;
END GetTicketMainFake;
//////Linq code
DataContext1 dataContext = new DataContext1.DataContext1();
//Exception here
//Could not build reader for node type Devart.Data.Linq.Provider.Query.au.
var r = dataContext.Getticketmainfake(null);
//////ADO.NET
OracleConnection oraCon = new OracleConnection(Properties.Settings.Default.ConnectionString);
OracleCommand oraCommand = new OracleCommand("NB.GetTicketMainFake", oraCon);
oraCommand.CommandType = System.Data.CommandType.StoredProcedure;
oraCommand.Parameters.Add(new OracleParameter("niClass", OracleDbType.Double)).Value = System.DBNull.Value;
OracleParameter oracleParam = oraCommand.Parameters.Add("RETURN", OracleDbType.Table);
oracleParam.Direction = System.Data.ParameterDirection.ReturnValue;
oracleParam.ObjectTypeName = "DD.CLOBTYPE_NESTED";
oraCon.Open();
//Exception here
// OCI-22303: тип "DD"."CLOBTYPE_NESTED" не найден
oraCommand.ExecuteNonQuery();
oraCon.Close();
Thanks!
Exception is always raised either I use ADO.net or Linq
Is it bug or i just don't understand something?
SQL :
CREATE OR REPLACE FUNCTION GetTicketMainFake(niClass IN dd.reference) RETURN dd.ClobType_Nested
IS
arr dd.ClobType_Nested := dd.ClobType_Nested();
BEGIN
RETURN arr;
END GetTicketMainFake;
//////Linq code
DataContext1 dataContext = new DataContext1.DataContext1();
//Exception here
//Could not build reader for node type Devart.Data.Linq.Provider.Query.au.
var r = dataContext.Getticketmainfake(null);
//////ADO.NET
OracleConnection oraCon = new OracleConnection(Properties.Settings.Default.ConnectionString);
OracleCommand oraCommand = new OracleCommand("NB.GetTicketMainFake", oraCon);
oraCommand.CommandType = System.Data.CommandType.StoredProcedure;
oraCommand.Parameters.Add(new OracleParameter("niClass", OracleDbType.Double)).Value = System.DBNull.Value;
OracleParameter oracleParam = oraCommand.Parameters.Add("RETURN", OracleDbType.Table);
oracleParam.Direction = System.Data.ParameterDirection.ReturnValue;
oracleParam.ObjectTypeName = "DD.CLOBTYPE_NESTED";
oraCon.Open();
//Exception here
// OCI-22303: тип "DD"."CLOBTYPE_NESTED" не найден
oraCommand.ExecuteNonQuery();
oraCon.Close();
Thanks!