PC Review


Reply
Thread Tools Rate Thread

Oracle Stored Procedure Cursor and Return Value

 
 
Hakan Dolas
Guest
Posts: n/a
 
      16th Mar 2004
Hi,

I have a StoredProcedure that returns a ref cursor and a numeric value.
I want to populate a datatable with the returning cursor, use the numeric
value elsewhere.

What is the method for this ?

I know that handling multiple cursors are easy but one cursor and one
numeric value is a bit confusing..

Thanks.



 
Reply With Quote
 
 
 
 
Hakan Dolas
Guest
Posts: n/a
 
      16th Mar 2004
I am using ODP.NET.

Here is my CommandText:

BEGIN PKGLOBAL.PSM_RUNNER(
pDESC => 'j2d2039',
pCRITERIA => '*',
pTYPE => -1,
List_Cursor => :cCursor,
rTOTALCOUNT => :rTotal);
END;

I am passing this text to CommandText property of OracleCommand which is
declared as "mOraCommand".
I am creating two OracleParameter classes.


Dim oraParamCursor As New OracleParameter("cCursor", OracleDbType.RefCursor)
oraParamCursor.Direction = ParameterDirection.Output

Dim oraParamCount As New OracleParameter("rTotal", OracleDbType.Int32)
oraParamCount.Direction = ParameterDirection.Output

mOraCommand.Parameters.Add(oraParamCursor)
mOraCommand.Parameters.Add(oraParamCount)


Now I want to fill a datatable with oraParamCursor, return the value of
oraParamCount.
Do I need to use OracleCommand.ExecuteNonQuery() or OracleDataAdapter.Fill()
or both ?

Because when I use either, following error is returned:
ORA-06550: line Y, column X:
PLS-00306: wrong number or types of arguments in call to 'PSM_RUNNER'
Any help would be great..

Thanks.



"Hakan Dolas" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi,
>
> I have a StoredProcedure that returns a ref cursor and a numeric value.
> I want to populate a datatable with the returning cursor, use the numeric
> value elsewhere.
>
> What is the method for this ?
>
> I know that handling multiple cursors are easy but one cursor and one
> numeric value is a bit confusing..
>
> Thanks.
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ODP.NET Ref Cursor Input to oracle Stored Procedure RCReddyCh@gmail.com Microsoft ADO .NET 2 23rd Jun 2007 03:31 AM
ODP.NET Ref Cursor Input to oracle Stored Procedure RCReddyCh@gmail.com Microsoft Dot NET Framework 0 9th Jun 2007 02:55 AM
Oracle cursor problem using DAAB Stored Procedure =?Utf-8?B?RFNJU3VwcG9ydA==?= Microsoft Dot NET Framework 4 6th May 2007 03:02 PM
Pass parameters to Oracle stored procedure with cursor volodymyr.sapiha@gmail.com Microsoft Dot NET 0 4th Oct 2005 04:22 PM
Oracle Stored Procedure Cursor and Return Value Hakan Dolas Microsoft ADO .NET 5 17th Mar 2004 11:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:40 PM.