Page 1 of 1

DataAdpter and StoredProcedure

Posted: Mon 21 May 2007 06:01
by ayav
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...

Posted: Mon 21 May 2007 07:53
by Alexey
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?

Posted: Mon 21 May 2007 11:03
by ayav
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

Posted: Mon 21 May 2007 13:41
by Alexey
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?