Re: DataSet w/ many tables to one Datagrid

Tech-Archive recommends: Fix windows errors by optimizing your registry



arun.hallan@xxxxxxxxx wrote:
> I have a dataset that calls a stored procedure within our system.
> The stored procedure saves each table into the dataset.
>
> I want now to display each table one after the other, all in the same
> datagrid.
>
>
> I've tried: this.grdResults.DataSource = results.DefaultViewManager;
>
> But that doesnt work.
>
If all the resultsets have the same number of columns, you can use a union
query to combine them into a single resultset.

If that is not feasible, then you are going to have to create a datatable or
collection class that combines all the resultsets and bind the grid to that
datatable.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Help getting Unique ID when using rs.Addnew
    ... use a stored procedure to handle the insert and ... Only if you have no concurrent users ... ... Bob Barrows ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Multiple ResultSets
    ... I have a problem again while retriveing multiple results sets from SQLServer ... later im trying to retrive multiple resultsets one after other. ... But im getting rs1 and rs1 are null. ... >> I have a stored procedure which returns mulitple resultsets ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Using Subqueries in an UPDATE Statement
    ... more) resultsets and not a table or a view. ... Sylvain Lafontaine, ing. ... I have the following stored procedure and i would like to know how I ... I want to insert InvoiceAmount into a table called tbl_Case (field ...
    (microsoft.public.access.adp.sqlserver)
  • Re: no records returned from stored procedure based command when working on local temp tables
    ... When a SP executes it returns one or more Resultsets. ... Resultsets you're seeing are from the operations executed early in the SP ... > I've written a stored procedure in SQL Server 7. ... > When used in a VB application, an ADO Command object that executes the ...
    (microsoft.public.data.ado)
  • Re: Stored Procedure returning a closed recordset
    ... processes these resultsets one-at-a-time. ... Check out my ADO Examples and Best Practices ... > I'm executing a stored procedure that should return a ... > doesn't think the sproc returns any records - when it should be. ...
    (microsoft.public.data.ado)