Solved

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

Posted on 2008-10-27
5
930 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

724 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