Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2011, 03:12 PM
Authorized User
 
Join Date: Sep 2004
Posts: 68
Thanks: 1
Thanked 0 Times in 0 Posts
Default Multiple Selects/cursor in Stored Procedure: Problem

Hello.

I'm running a classic asp program and using ADO to call my stored procedure.

The stored procedure does the following:

1) Delete all records in workTable
2) Declare a Cursor
3) Execute Select Statement to populate Cursor
4) Use fetch and if else statements to populate workTable with data from cursor
5) Run select statement on workTable and join other tables to get all the data I need

When I run the stored procedure from SQL Server Management Studio, I receive the result set that I want.

However, when I run the stored procedure, using ADO, from my classic asp program, no data is returned. What am I doing wrong? If I delete steps 1 - 4 above from my stored procedure and run them separately and then run my stored procedure with ONE select statement (step 5), i have no problem: my asp program writes the correct result set. However, I would really like to keep all 5 steps in the single stored procedure and run them in one step.

Any help would be appreciated.

Thank you.

Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL stored procedure with multiple data sets obiron Access VBA 0 April 9th, 2010 06:21 AM
trying to get data from multiple selects ceevk1 VB Databases Basics 1 April 3rd, 2007 12:05 PM
Multiple Selects in SQL QueryStrings doonman BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 6 January 30th, 2006 07:01 AM
multiple selects -single where clause collie SQL Server 2000 3 January 21st, 2005 01:27 AM
Two selects in one procedure Trojan_uk SQL Server 2000 2 December 17th, 2003 05:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.