dbTalk Databases Forums  

Help S.O.S: How to return resultset from procedure and use it on c#

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Help S.O.S: How to return resultset from procedure and use it on c# in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
A Real Dead One
 
Posts: n/a

Default Help S.O.S: How to return resultset from procedure and use it on c# - 01-14-2008 , 04:27 AM






Hello everybody, i need your help. I got a oracle procedure that gives
an parameter cursor. I want to use the resultset on c#. Below my code
is written. When i want to call procedure from c#, i'm confused to
send parameter. Wichc typed parameter is sent from c# or how to solve
this mess.

--This is my types package
create or replace PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;

--my procedure body
create or replace
PROCEDURE RETURN_RESULT_SET(ccc in out TYPES.cursor_type) is

BEGIN

open ccc for 'select * from PERSONEL';

END RETURN_RESULT_SET;


--my c# commands
OleDbCommand DbCommand = new OleDbCommand("RETURN_RESULT_SET", con);
DbCommand.CommandType = CommandType.StoredProcedure;
.......
OleDbDataReader myReader = DbCommand.ExecuteReader();

Reply With Quote
  #2  
Old   
news.verizon.net
 
Posts: n/a

Default Re: Help S.O.S: How to return resultset from procedure and use it on c# - 01-14-2008 , 06:30 AM







"A Real Dead One" <ilkayaktas (AT) gmail (DOT) com> wrote

Quote:
Hello everybody, i need your help. I got a oracle procedure that gives
an parameter cursor. I want to use the resultset on c#. Below my code
is written. When i want to call procedure from c#, i'm confused to
send parameter. Wichc typed parameter is sent from c# or how to solve
this mess.

--This is my types package
create or replace PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;

--my procedure body
create or replace
PROCEDURE RETURN_RESULT_SET(ccc in out TYPES.cursor_type) is

BEGIN

open ccc for 'select * from PERSONEL';

END RETURN_RESULT_SET;


--my c# commands
OleDbCommand DbCommand = new OleDbCommand("RETURN_RESULT_SET", con);
DbCommand.CommandType = CommandType.StoredProcedure;
......
OleDbDataReader myReader = DbCommand.ExecuteReader();
I haven't used c#, but have you gone to otn.oracle.com. I believe they have
a whole slew of examples there on this.
Jim




Reply With Quote
  #3  
Old   
news.verizon.net
 
Posts: n/a

Default Re: Help S.O.S: How to return resultset from procedure and use it on c# - 01-14-2008 , 06:30 AM




"A Real Dead One" <ilkayaktas (AT) gmail (DOT) com> wrote

Quote:
Hello everybody, i need your help. I got a oracle procedure that gives
an parameter cursor. I want to use the resultset on c#. Below my code
is written. When i want to call procedure from c#, i'm confused to
send parameter. Wichc typed parameter is sent from c# or how to solve
this mess.

--This is my types package
create or replace PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;

--my procedure body
create or replace
PROCEDURE RETURN_RESULT_SET(ccc in out TYPES.cursor_type) is

BEGIN

open ccc for 'select * from PERSONEL';

END RETURN_RESULT_SET;


--my c# commands
OleDbCommand DbCommand = new OleDbCommand("RETURN_RESULT_SET", con);
DbCommand.CommandType = CommandType.StoredProcedure;
......
OleDbDataReader myReader = DbCommand.ExecuteReader();
I haven't used c#, but have you gone to otn.oracle.com. I believe they have
a whole slew of examples there on this.
Jim




Reply With Quote
  #4  
Old   
news.verizon.net
 
Posts: n/a

Default Re: Help S.O.S: How to return resultset from procedure and use it on c# - 01-14-2008 , 06:30 AM




"A Real Dead One" <ilkayaktas (AT) gmail (DOT) com> wrote

Quote:
Hello everybody, i need your help. I got a oracle procedure that gives
an parameter cursor. I want to use the resultset on c#. Below my code
is written. When i want to call procedure from c#, i'm confused to
send parameter. Wichc typed parameter is sent from c# or how to solve
this mess.

--This is my types package
create or replace PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;

--my procedure body
create or replace
PROCEDURE RETURN_RESULT_SET(ccc in out TYPES.cursor_type) is

BEGIN

open ccc for 'select * from PERSONEL';

END RETURN_RESULT_SET;


--my c# commands
OleDbCommand DbCommand = new OleDbCommand("RETURN_RESULT_SET", con);
DbCommand.CommandType = CommandType.StoredProcedure;
......
OleDbDataReader myReader = DbCommand.ExecuteReader();
I haven't used c#, but have you gone to otn.oracle.com. I believe they have
a whole slew of examples there on this.
Jim




Reply With Quote
  #5  
Old   
news.verizon.net
 
Posts: n/a

Default Re: Help S.O.S: How to return resultset from procedure and use it on c# - 01-14-2008 , 06:30 AM




"A Real Dead One" <ilkayaktas (AT) gmail (DOT) com> wrote

Quote:
Hello everybody, i need your help. I got a oracle procedure that gives
an parameter cursor. I want to use the resultset on c#. Below my code
is written. When i want to call procedure from c#, i'm confused to
send parameter. Wichc typed parameter is sent from c# or how to solve
this mess.

--This is my types package
create or replace PACKAGE Types AS
TYPE cursor_type IS REF CURSOR;
END Types;

--my procedure body
create or replace
PROCEDURE RETURN_RESULT_SET(ccc in out TYPES.cursor_type) is

BEGIN

open ccc for 'select * from PERSONEL';

END RETURN_RESULT_SET;


--my c# commands
OleDbCommand DbCommand = new OleDbCommand("RETURN_RESULT_SET", con);
DbCommand.CommandType = CommandType.StoredProcedure;
......
OleDbDataReader myReader = DbCommand.ExecuteReader();
I haven't used c#, but have you gone to otn.oracle.com. I believe they have
a whole slew of examples there on this.
Jim




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.