M
Mike
Hi Folks,
I'm actually encountering a known problem, well i've already seen a
few posts, concerning the call of a stored proc. with a ref cursor as
output parameter. Although i've tried, everything (i think) it still
doesnt work by me and i really dont know why.
Well here's first my proc, included inside a package :
Package pa_xxx
type ty_ref_cur is ref cursor;
procedure pr_xxx
(mp_userid in t_user.userid%type,
mp_pers_id in t_person.personid%type,
cu_data out ty_ref_cur
)
is
begin
open cu_data for
select col1, col2 from t_xxx where userid = mp_userid and
persid = mp_pers_id;
...
end pr_xxx;
Then, from a client application, i've got a class where i try to call
this proc as follows :
public DataSet RunProc(string p_ProcName, int UserId, int PersId)
{
DataSet RowSet = new DataSet();
OracleCommand cmd = new OracleComman(p_ProcName,m_conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter param1 = new OracleParameter();
param1.ParameterName = "mp_userid";
param1.OracleType = OracleType.Number;
param1.Direction = ParameterDirection.Input;
param1.Value = UserId;
cmd.Parameters.Add(param1);
OracleParameter param2 = new OracleParameter();
param2.ParameterName = "mp_persid";
param2.OracleType = OracleType.Number;
param2.Direction = ParameterDirection.Input;
param2.Value = PersId;
cmd.Parameters.Add(param2);
OracleParameter param3 = new OracleParameter();
param3.ParameterName = "cu_data";
param3.OracleType = OracleType.Cursor;
param3.Direction = ParameterDirection.Output;
cmd.Parameters.Add(param3);
OpenConn();
OracleDataAdapter adpt = new OracleDataAdapter(cmd);
adpt.Fill(RowSet);
return RowSet;
}
So, everytime it reaches the statement "adpt.Fill", it fails returning
the message "unsupported oracle datatype encountered user defined..."
It seems that it doesnt recognize the datatype ty_refcur from my proc.
and i dont find why. I've added correctly a reference to the oracle
client. What more could i do ?
Thanks for helping,
Mike
I'm actually encountering a known problem, well i've already seen a
few posts, concerning the call of a stored proc. with a ref cursor as
output parameter. Although i've tried, everything (i think) it still
doesnt work by me and i really dont know why.
Well here's first my proc, included inside a package :
Package pa_xxx
type ty_ref_cur is ref cursor;
procedure pr_xxx
(mp_userid in t_user.userid%type,
mp_pers_id in t_person.personid%type,
cu_data out ty_ref_cur
)
is
begin
open cu_data for
select col1, col2 from t_xxx where userid = mp_userid and
persid = mp_pers_id;
...
end pr_xxx;
Then, from a client application, i've got a class where i try to call
this proc as follows :
public DataSet RunProc(string p_ProcName, int UserId, int PersId)
{
DataSet RowSet = new DataSet();
OracleCommand cmd = new OracleComman(p_ProcName,m_conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter param1 = new OracleParameter();
param1.ParameterName = "mp_userid";
param1.OracleType = OracleType.Number;
param1.Direction = ParameterDirection.Input;
param1.Value = UserId;
cmd.Parameters.Add(param1);
OracleParameter param2 = new OracleParameter();
param2.ParameterName = "mp_persid";
param2.OracleType = OracleType.Number;
param2.Direction = ParameterDirection.Input;
param2.Value = PersId;
cmd.Parameters.Add(param2);
OracleParameter param3 = new OracleParameter();
param3.ParameterName = "cu_data";
param3.OracleType = OracleType.Cursor;
param3.Direction = ParameterDirection.Output;
cmd.Parameters.Add(param3);
OpenConn();
OracleDataAdapter adpt = new OracleDataAdapter(cmd);
adpt.Fill(RowSet);
return RowSet;
}
So, everytime it reaches the statement "adpt.Fill", it fails returning
the message "unsupported oracle datatype encountered user defined..."
It seems that it doesnt recognize the datatype ty_refcur from my proc.
and i dont find why. I've added correctly a reference to the oracle
client. What more could i do ?
Thanks for helping,
Mike