You can either change the table names so they are the same as the table you
want  to merge into, and then so the merge or create a new table with relations
that have the tables created by the stored proc calls become child rows.  You
then put column expressions referring to the child table column and you have
what you want.

--- adonis <[EMAIL PROTECTED]> wrote:
> I have created a stored procedure in Sql Server which uses a cursor and
> returns multiple identical(schemawise) resultset. When this stored
> procedure is used to populate a dataset, naturally multiple datatables are
> created. I need to merge the data avaiable in these multiple tables of the
> dataset in one table so that I can display the entire data at once in a
> datagrid.
> Following the code snippet which I am using to merge though in vain.
>
> DataSet dsSummary1 = new DataSet();
> DataSet dsSummary;
> DataView dvSummary;
> dsSummary = BRErrors.GetSummary();
> for(int i=0;i <= dsSummary.Tables.Count -1;i++)
> {
>  dsSummary1.Merge(dsSummary.Tables[i]);
> }
>
> dvSummary = dsSummary1.Tables[0].DefaultView;
>
> datagridSummary.DataSource = dvSummary;
> datagridSummary.DataBind();
>
> Would appreciate a quick response.
>
> Thank you for your time.

Reply via email to