sys-refcursor

Binding ASP.NET GridView to an Oracle SYS_REFCURSOR

We have a Procedure in Oracle with a SYS_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem. Here is what the procedure looks like: create or replace PROCEDURE GETSOMEDATA ( P_Data OUT SYS_REF...

Returning Oracle ref cursor and appending multiple results

I have this problem I'm hoping someone knows the answer to. I have an oracle stored procedure that takes a customer id and returns all the customer's orders in a ref_cursor. Oversimplifying it, this is what I have: Orders - orderId - siteID Customers - siteID - Name GetOrder(siteID, outCursor) /* returns all orders for a customer */ ...

Oracle Cursor and JDBC ODBC

I have some procedures to execute in the database that has an OUT REFCURSOR parameter. When I am connecting with the JDBC thin client, everything works fine. However, if I were to change the connection string to refer to the ODBC data source pointing to the same database, those procedures will fail. The procedures that do not use an OUT...

How to call a DB2 stored procedure from C#?

I use DB2 9.7 for Linux. The stored procedure is implemented in PL/SQL (Oracle's programming language), so, the record set is an output parameter (SYS_REFCURSOR). CREATE OR REPLACE PROCEDURE TEST_CURSOR ( CV_1 OUT SYS_REFCURSOR ) IS BEGIN OPEN CV_1 FOR SELECT 1 COLUMN FROM DUAL; END TEST_CURSOR; I don't know how to dec...

How can I use Oracle SQL developer to run stored procedures?

* EDIT6: * This is what ended up working for me (from accepted answer): var ret1 number var tran_cnt number var msg_cnt number var rc refcursor exec :tran_cnt := 0 exec :msg_cnt := 123 exec get_account(Vret_val => :ret1, Vtran_count => :tran_cnt, Vmessage_count => :msg_cnt, Vaccount_id => 1, rc1 => :rc) print :tran_cnt print :msg_cnt pr...

How to use NHibernate to process multiple resultsets/SYS_REFCURSOR from Oracle stored procedure

I can get NHibernate (v2) to return and process a single SYS_REFCURSOR that contains my single resultset. Is it possible for multiple resultsets/SYS_REFCURSOR's in NHibernate? What would be the syntax of the .hbm.xml file to map multiple resultsets from the SYS_REFCURSOR's? thanks. ...

ODP .NET Getting a SYSREFCURSOR output. {"Unsupported column datatype"} error

I am trying to execute a procedure that returns a stored procedure. My version of Oracle DB is 9.2 and the ODP .NET version is 10.2.0.100 My C# code looks like this. OracleCommand od = new OracleCommand(); od.Connection = oc; OracleParameter opBranchNo; OracleParameter opSysRef; od.CommandType = System.Data.CommandType.StoredProcedure;...

Oracle SQL Developer - Missing IN or OUT parameter at index:: 1

Hi, I am having trouble testing this simple stored procedure in Oracle Sql Developer. The stored procedure does a simple select and returns a cursor. create or replace PROCEDURE GET_PROJECT_DRF_HISTORY ( projectId IN NUMBER, resultset_out OUT sys_refcursor ) AS BEGIN OPEN resultset_out for SELECT * from GLIDE_HISTORY where G...

Quick-n-dirty results: View results of Procedure OUT cursor in SQL Worksheet?

Platform: Oracle Language: PL/SQL Issue: Want to output a procedure OUT cursor into the SQLDeveloper SQLWosksheet. Anyone know how to use the Oracle "Select * from Table( PipelinedFunction( Param ) ) " to check procedure code output cursors? I am using Crsytal Reports off of an Oracle stored procedure. Crystal requires that a procedu...

how to call one stored proc from anther and modify refcursor that is returned?

I have two stored procs, p_proc1 and p_proc2. p_proc1 returns a refcursor and I want to use the data in p_proc2. Is it possible call p_proc1 in p_proc2 and modify the dataset (outer join another table)? The database is Oracle. ...