logo       

Re: Please comment!: msg#00124

windows.devel.dotnet.web

Subject: Re: Please comment!

Its pretty simple, you just add additional select queries to your stored
procedure

CREATE PROCEDURE [dbo].[sptest] AS
select * from users
select * from employees
GO

This will return 2 resultsets.

If you use a SqlDataReader then you can iterate through the results sets
using the datareader.NextResult() method, or with a dataset, you can
iterate through the Tables[] collection.

MK

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Daniel Schaffer
Sent: Friday, June 24, 2005 9:20 AM
To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
Subject: Re: [DOTNET-WEB] Please comment!

Very nice... this would be a lot easier... except, how do I get a stored
procedure to return multiple sets of data like that? I've never heard of
being able to do that.

===================================
This list is hosted by DevelopMentor(r) http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise