473,504 Members | 13,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

select query using cursors

hi friends,
this is balu.here i am using oracle 10g.i need to call records from database using procedures.so i created ref cursor in package.package and package body is created successfully.but i don't know how to call this from my application code(in .net using c#).i need to display these values in gridview.please send me the solution. here is my code.
Expand|Select|Wrap|Line Numbers
  1. create or replace package pkg1
  2. as
  3.  type t_cursor is ref cursor;
  4.  procedure get_employee(cur_employees out t_cursor);
  5. end pkg1;
  6.  
Expand|Select|Wrap|Line Numbers
  1. create or replace package body pkg1
  2. as
  3.  procedure get_employee(cur_employees out t_cursor)
  4.  is
  5.  begin
  6.   open cur_employees for select * from emp;
  7.  end get_employee;
  8. end pkg1;
  9.  
Jul 14 '10 #1
1 2178
amitpatel66
2,367 Recognized Expert Top Contributor
You have posted your question in the wrong forum. This is an oracle forum and do post your oracle queries in this forum and we would be happy to help.

Moderator
Jul 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

22
10631
by: T.S.Negi | last post by:
Hi All, I want to avoid using cursors and loops in stored procedures. Please suggest alternate solutions with example (if possible). Any suggestion in these regards will be appreciated. ...
2
2351
by: TaeHo Yoo | last post by:
Have a problem with using cursors in SQL server enterprise manager. My code sql query is followed --------------------------------------- DECLARE @element_name varchar(100) DECLARE...
1
18035
by: Razia | last post by:
Hello everyone I want to create a select query according to the values in a single dimension array Select * from <table Name> where <Array items> Can anybody give me some suggestions
13
2827
by: forbes | last post by:
Hi, I have a user that used the Query Wizard to create a query in Access. Now she claims that her master table is missing all the data that was excluded from the query. Can you create anything...
0
2115
by: trishbarker | last post by:
I've created a simple select query in Microsoft Access wherein I'm searching all records based on the "Final Payment Due Date". The Final Payment Due Date is a calculated expression based on two...
1
1233
by: 123123 | last post by:
I having one table its contain N columns But Select Query Using only for N-1 Columns , so, Select Query Dont Enter The N-1 Columns . How To Solve It
6
4397
by: bill.mckinstry | last post by:
I have simple Select Query using two small tables. Table A includes Statement ID & Date. Table B includes Statement ID, Loan ID & Payment Amount. The Query selects payments and amounts from Table...
2
16438
by: ravenfrost | last post by:
Hello, I'm trying to query a sql table to see if a value already exists. strMAC = "11:22:33:44:55:66" Call MsgBox(QueryDB("SELECT * FROM main WHERE MAC = '" & strMAC & "'", conn)) Function...
1
1628
by: atishrg | last post by:
Hello All, I am facing one strange problem.. I am using a select query in my function which will return specified product details according to product code selected by user.. here is the...
8
11887
by: izharmel | last post by:
Hi, I'm trying to display data from a table using a query. My code: Dim db As Database Dim rs As Recordset Dim qdf As QueryDef Dim strSql As String Set db = CurrentDb
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.