?
Solved

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

Posted on 2008-10-27
5
Medium Priority
?
939 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 38

Accepted Solution

by:
Geert Gruwez earned 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup
Suggested Courses

762 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