This is the meat of it, if you need more, you know where to ask...

        SqlConnection conn = new SqlConnection(connstring);
        SqlCommand cmd2 = new SqlCommand(proc, conn);
        cmd2.CommandType = CommandType.StoredProcedure;
        DataSet ds = new DataSet();
        SqlDataAdapter adapter = new SqlDataAdapter(cmd2);
        adapter.Fill(ds);

DataSet ds should have 4 tables, which you can use to fill your grids.

dg0.DataSource = ds.Tables[0];
dg1.DataSource = ds.Tables[1];

On 9/20/05, yalwho <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have a stored procedure that returns 4 different recordsets. I want
> to then have 4 different datagrids on a page display one each. Can
> anyone provide psuedo code on how this would be accomplished? It seems
> this would be more efficient than 4 execute statements and populating
> 4 different datasets then binding each.
> 
>  It seems that ADO.Net would have a way to populate a dataset with the
> 4 recordsets(results from the stored procedure) and then assign each
> by index to the datasource of the datagrids. Am I close?
> 
> Thanks
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to