473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to call a SQL function which returns a cursor using c#

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
Mar 3 '08 #1
2 1878
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
Expand|Select|Wrap|Line Numbers
  1. OracleCommand.CommandType = CommandType.StoredProcedure 
  2. OracleParameter p_case_action_id = new OracleParameter("@p_case_action_id", OracleDbType.Int32);
  3. p_case_action_id.Direction = ParameterDirection.Input;
  4. p_case_action_id.Value = intSourceID;
  5. orlCmd5.Parameters.Add(p_case_action_id);
  6.  
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
Mar 3 '08 #2
Plater
7,872 Expert 4TB
I have merged your two threads, please do not double post your questions.
MODERATOR


What benefit does returning a cursor offer over returning a table with one record in it?
Mar 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: aa | last post by:
ftell($fp) returns the position os the cursor in a line Is there a function which returns the line number at which the cursor is?
8
by: Bill Ehrreich | last post by:
I'm faced with a situation where I will need to calculate a column for a resultset by calling a component written as a VB6 DLL, passing parameters from the resultset to the component and setting...
5
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one...
2
by: Kamran | last post by:
Hi I have very little experience of C++, nevertheless I have been asked to write a gui using QT/QWT. I know that I should direct the question to the relevant mailing list and I have done that but...
4
by: Rodusa | last post by:
I am having problem to apply updates into this function below. I tried using cursor for updates, etc. but no success. Sql server keeps telling me that I cannot execute insert or update from inside...
7
by: C.Joseph Drayton | last post by:
I have a problem that I am hoping someone can help me with. First let me describe the problem. I have an HTML form that in one field has an onBlur call to a JavaScript function. When you exit the...
5
by: marcsirois | last post by:
I have an SQL Query that looks like this. I simplified it for the purpose of this example, but it's still a runnable query SELECT TOP 1 FundedPositions.PositionNumber AS , (select top 1...
1
by: satish mullapudi | last post by:
Hi, I am using DB2 v8.2 & jdk 1.4. 1. I have a java program which returns an array which contains 1 to 5 numbers. The code: public class ArrayTest { public static final int ARRAY_SIZE = 5;...
9
by: Marcpp | last post by:
Hi, I need to returns a tuple from a function (reads a database) Any idea?.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.