all groups > sql server programming > september 2004 >
You're in the

sql server programming

group:

two process


two process Savas Ates
9/6/2004 6:12:57 PM
sql server programming:
can i gain in an asp page which using a stored procedure with execute
method...

i want to execute the query and return the count value the query at the same
time.. is it possible?


Re: two process Dejan Sarka
9/7/2004 8:34:42 AM
You can use a second query in the SP to select the count value and return it
as an output parameter. If you are talking about number of rows, then you
can simply check the @@ROWCOUNT global variable inside the SP and return
this as an output value.

--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com

[quoted text, click to view]

Re: two process Savas Ates
9/7/2004 10:10:22 AM
CREATE PROCEDURE zzz @userid numeric(18),@polim numeric(18) OUTPUT
AS


select * from users where userid=@userid

select @polim= count(*) from users
return (@polim)
GO

*********************
how can i gain the value of @polim in asp

in asp

set rs=baglantim.execute ("declare @sa as int exec zzz @userid='21',
@polim=@sa OUTPUT")

response.write rs("@sa")
like this (only i tried i dont know how can i gain the value it with execute
method....)





AddThis Social Bookmark Button