Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Stored Proc Select and Params

Author  Topic 

wombel
Starting Member

14 Posts

Posted - 2003-02-27 : 09:00:27
Hi,

I need to return the result of a select statement along with some
parameters from a stored procedure. This was no problem with ASP 3.0. I
just opened a recordset and the parameters were passed along at the same
time.

No, this does not seem to work any more. I tested with the following
quite simple SP:

ALTER PROCEDURE global_application_start_orte
(
@intRowCount smallint output
)

AS
SET NOCOUNT ON

SELECT kennung,ort,kurzname FROM waslos_orte WITH (NOLOCK)
SELECT @intRowCount = @@rowcount


Can anyohne help me with that?

TIA
Wombel



Thomas Wrobel
Senior IT Manager

nr
SQLTeam MVY

12543 Posts

Posted - 2003-02-27 : 09:39:09
The output parameter will not be available until after the recordset has been delivered.
Best is to work withy a disconnected client side recordset theb the output parameter will be available as soon as the recordset is disconnected.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -