Working with collection
Posted: Mon 10 Dec 2012 05:47
Hi there! I need your help so much. We've got an object type,
collection,
and function.
what we need to do to get missed_appts's values (num number(12),dat date.......) in ASP.NET(C#)
(C#) code
Code: Select all
CREATE OR REPLACE TYPE abc."CUR_O" IS OBJECT(
num number(12),
dat date.......
collection,
Code: Select all
CREATE OR REPLACE TYPE abc."CUR_T" IS TABLE OF abc.cur_o;
and function.
Code: Select all
Check(pL in abc.tune.light%type,
pP in number,
ErrorMsg out varchar2,
missed_appts out abc.cur_t) return boolean;
what we need to do to get missed_appts's values (num number(12),dat date.......) in ASP.NET(C#)
(C#) code
Code: Select all
using (OracleCommand myCommand = new OracleCommand("abc.z1.func", c))
{
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.Parameters.Add("pl", k.light);
myCommand.Parameters.Add("pp", p);
myCommand.Parameters.Add("errormsg", OracleDbType.VarChar, ParameterDirection.Output);
myCommand.Parameters.Add("missed_appts", OracleDbType.Object, "abc.currzapis_t").Direction = ParameterDirection.Output;
myCommand.ExecuteNonQuery();
myCommand.ExecuteArray(0);
msg = Convert.ToString(myCommand.Parameters["errormsg"].Value);
}