Solved

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

Posted on 2008-10-27
5
908 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 36

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Replacing HTML tags in Textarea/Textbox 5 23
cs.Designer Issue(2) 2 14
Get String split 5 31
Oracle and DateTime math 6 0
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now