DataAdpter and StoredProcedure

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ayav
Posts: 3
Joined: Mon 21 May 2007 05:35

DataAdpter and StoredProcedure

Post by ayav » Mon 21 May 2007 06:01

I would like to add to my DataAdapter a stored Procedure
(right click --> add query --> use existing stored procedure)

I want the stored procedure to return all the rows of the EMP table
(select * from EMP) in order to fill the EMP DataTable.

is it possible? which data type should the stored procedure return?
can you show me an example?

Thanks
Aya

p.s.
I found the way to do it manualy, using ref cursor in your Help files.
However, this I can do without your product...

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 21 May 2007 07:53

I would like to add to my DataAdapter a stored Procedure
Don't you confuse DataAdapter with TableAdapter?
I found the way to do it manualy, using ref cursor in your Help files.
However, this I can do without your product...
You are correct. The type should be ref cursor. How can you add such stored proc without our data provider?

ayav
Posts: 3
Joined: Mon 21 May 2007 05:35

Post by ayav » Mon 21 May 2007 11:03

1) you right, I meant TableAdapter.
How can I use Stored Procedure that return all the EMP table rows using the tableAdapter wizard.


2) the fill method is supported by OracleDataAdapter as you can see in this link

http://msdn2.microsoft.com/en-us/librar ... S.80).aspx

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 21 May 2007 13:41

You should add a TableAdapter to the dataset and configure it. On the appropriate page choose "Use existing stored proc" radio, then select the name of the stored proc from the list. Do you already have the stored proc you need?

Post Reply