How to call a SQL function which returns a cursor

Author Topic
sri k
Member

Joined: 27 Feb 2008
Country:
Posts: 2

Posted: 03 Mar 2008 13:07:22

Hi

i am new to .net. Can someone please advise how to call a SQL function which returns a cursor using c#

i have tried to call using
OracleCommand.CommandType = CommandType.StoredProcedure
OracleParameter p_case_action_id = new OracleParameter("@p_case_action_id", OracleDbType.Int32);
p_case_action_id.Direction = ParameterDirection.Input;
p_case_action_id.Value = intSourceID;
orlCmd5.Parameters.Add(p_case_action_id);

but it's throwing an exception saying invalid arguments or saying the function name is invalid

i even tried to call the function using CommandText rather than storedprocedure and the result is same errors

Function
--------------
FUNCTION get_student_data(studentid IN NUMBER) RETURN case_cursor;

Thanks in advance
Sri

Hi

i am new to .net. Can someone please advise how to call a SQL function which returns a cursor using c#

i have tried to call using
OracleCommand.CommandType = CommandType.StoredProcedure
OracleParameter p_case_action_id = new OracleParameter("@p_case_action_id", OracleDbType.Int32);
p_case_action_id.Direction = ParameterDirection.Input;
p_case_action_id.Value = intSourceID;
orlCmd5.Parameters.Add(p_case_action_id);

but it's throwing an exception saying invalid arguments or saying the function name is invalid

i even tried to call the function using CommandText rather than storedprocedure and the result is same errors

Function
--------------
FUNCTION get_student_data(studentid IN NUMBER) RETURN case_cursor;

Thanks in advance
Sri
Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency