RE: Handling multiple result sets

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 01/17/05


Date: Mon, 17 Jan 2005 08:51:05 -0800

With a DataSet, the two result sets become two DataTables. If you use
TableMappings, you can give these tables real names. Otherwise, they are
Table and Table1.

With a DataReader, use NextResult to get to the next result set (much like
Next on a Recordset object in ADO).

---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"aussie rules" wrote:
> Hi,
> 
> I have a stored procedure that returns (in the one vb call) two sets of
> data( ie the stored procedure does two select statements, and when run in an
> isql session, to separate result tables are displayed).
> 
> Is it possible to handle these two results within a single call to the sql
> server, as I do not want to have to do a second return trip to the server
> 
> Thanks.
> 
> Thanks
> 
> 
> 


Relevant Pages

  • Re: SQL/ADO (2.8) Timeout Error - Cant resolve
    ... > Server 2000 back end. ... > timeout limit. ... And I’ve used SQL Query Analyzer to run the ... I am running a stored procedure that will backup a SQL Server ...
    (microsoft.public.sqlserver.clients)
  • Re: How to test a custom conflict resolver procedure
    ... once I set my stored procedure as a custom resolver? ... Here is an example of a custom resolver I wrote which might help you ... --creating the stored procedure conflict resolver ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.replication)
  • Re: quality of service
    ... company that hosts my company's web site and connected SQL Server database. ... The same stored procedure is called from a number of different web pages ... The company that hosts my web site and connected SQL ... this clustering is indicative of slowed or failed SQL Server responses due ...
    (microsoft.public.sqlserver.server)
  • Re: Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parame
    ... The @RowV Values when it reaches the stored procedure on SQL server always gets reset to 0x00 No matter what value I set it to. ... I am using timestamps to determine if the row has been updated on the server before I apply the new updates. ... @ProviderID smallint, ... @RowOut timestamp OUTPUT ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Problem using SP as record source with Access2002 & SQL Server 7
    ... I've installed a brand new copy of SQL Server 2000 with the original ... I've created the folowing stored procedure for the resync ... Resync Command: ALL_CUSTOMERS_RESYNC? ... I need to upgrade to a newer version of Microsoft SQL ...
    (microsoft.public.access.adp.sqlserver)