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
|