Solved

how to bind the oracle store proc -CURSOR with sqldatasource -GRIDVIEW in asp.net 2.0, c#

Posted on 2008-10-27
5
923 Views
Last Modified: 2013-12-18
Hi,
I am having a SQLdatasource with a grid associated to it,
i need to change the SQL inline to a store procedure, i have written a store procedure
and taken input parameters as <selectparameters>

but i am not able to get data from cursor - getting errors.

I need syntax  for giving input and getting output variables from store proc -- in aspx.

it would be great help , if i can get a store proc as an example.

any articles please post the links .....
0
Comment
Question by:Swetha_aJaX
5 Comments
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 22992687
create package with a procedure in it with a sysrefcursor


you use the O_Results param as a dataset


CREATE OR REPLACE PACKAGE SCHEMA.PKG_EXPORT AS
 
  PROCEDURE ExportData(I_PARAM IN VARCHAR2, O_RESULTS OUT SYS_REFCURSOR);
 
END PKG_EXPORT;
/
 
CREATE OR REPLACE PACKAGE BODY SCHEMA.PKG_EXPORT AS
  PROCEDURE ExportData(I_PARAM IN VARCHAR2, O_RESULTS OUT SYS_REFCURSOR) AS
  BEGIN
    OPEN O_RESULTS FOR 
      SELECT * FROM TABLE
      WHERE PARAM IN I_PARAM; 
  END;  
END PKG_EXPORT;
/

Open in new window

0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question