Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 3rd, 2006, 05:34 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Return 2 Recordsets from 1 Stored Proc

Hi there,
I am trying to run the following stored proc from asp.net 2.0 and have two record sets returned.

How do i go about doing this? Is it possible?

If I execute the SP on SqlServer it returns 2 recordsets as i want... Just unsure about asp.net. I realize I could use 2 stored procs to achieve the same thing but want to know how to do it with one.

thanks :)


ALTER PROCEDURE [dbo].[spgGetCreditorControl]
    @CreditorID int,
    @StartDate DateTime,
    @EndDate DateTime


    SELECT PurchaseInvSummary.Date AS PurchaseDate,
           PurchaseInvSummary.Reference AS PurchaseRef,
               PurchaseInvSummary.Gross AS PurchaseGross,

    FROM PurchaseInvSummary INNER JOIN
           Customer ON (PurchaseInvSummary.CreditorID = Customer.ID)
    WHERE (PurchaseInvSummary.CreditorID = @CreditorID) AND
           (Date >= @StartDate) AND
           (Date <= @EndDate)

    SELECT [Transaction].Date AS TransactionDate,
           [Transaction].Narrative AS TransactionNarrative,
           [Transaction].Amount AS TransactionAmount

    FROM [Transaction] INNER JOIN
           AccountType ON [Transaction].AccountID = AccountType.AccountID
    WHERE AccountType.CustomerID = @CreditorID AND
           [Transaction].Date >= @StartDate AND
           [Transaction].Date <= @EndDate


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
Storing return value of a Stored Proc in a Session mahajanvit ASP.NET 2.0 Basics 0 November 2nd, 2006 10:16 AM
problem with a stored proc trying to return blobs Phrozt SQL Server 2000 2 May 12th, 2006 09:36 AM
Return output variable to VB from SQL stored proc busterbunny BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 March 27th, 2006 10:24 PM
Using recordsets in Stored Procedures MaxGay SQL Server 2000 3 February 25th, 2005 11:38 AM

All times are GMT -4. The time now is 01:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.