Groups | Blog | Home
all groups > dotnet ado.net > april 2007 >

dotnet ado.net : Multi select stored proc and strongly typed data sets



Amir Tohidi
4/26/2007 9:40:00 AM
Hi

I have a stored proc that has two select statements in it i.e. it returns 2
result sets.

When I try to use the Visual Studio DataSet designer and point it to this
stored proc, it only sees the first select of the sp and therefore only
generates the one DataTable etc.

Is there a way around this?

I then hand crafted my own strongly typed DataSet but I can't even use an
adaptor and call the sp myself: it works, but it puts the data in two new
Earl
4/29/2007 3:54:29 AM
I could be wrong, but I don't think ADO.Net can handle your scenario. The
best solution would be to break the two sprocs into separate entities, then
call them both with an exec in a separate sproc. You could then generate
separate datatables for both sprocs. Maybe Bill Vaughn can shed some more
light on this topic, as it is not the usual run-of-the-mill scenario.

[quoted text, click to view]

AddThis Social Bookmark Button