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 when function with Table return type is invoked
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
As for using this function with LINQ, the problem is that LinqConnect does not support object types, including Oracle arrays and nested tables.
As for calling GetTicketMainFake from ADO.NET, could you please specify if "dd" is a package or schema? In the first case, the problem should be that the UDT you are using cannot be seen outside the package; to resolve the problem, please try declaring it globally. If "dd" is a schema, please ensure that the user under which you are connecting to the server has proper privileges to access it.
Please tell us if this helps.
As for calling GetTicketMainFake from ADO.NET, could you please specify if "dd" is a package or schema? In the first case, the problem should be that the UDT you are using cannot be seen outside the package; to resolve the problem, please try declaring it globally. If "dd" is a schema, please ensure that the user under which you are connecting to the server has proper privileges to access it.
Please tell us if this helps.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48