I want to be able to count the number of records in a record set by passing a parameter to a stored procedure.
For Example location id 7 is going to list all users who are in the 'TZY' Office. Then I can get the count and run it against location id 23 and get a count of all users at the "RES" office.
I have a stored procedure and I can execute it from ASP but How do I get the results in ASP?! I know it sounds 'simple'.. what am I missing.
Here is my stored procedure:
===================================================
CREATE PROCEDURE myCounter
@recordid int,
@nRecordCount int
as
Select @nRecordCount = COUNT(*)
FROM tblusers Where [_location]=@Recordid
GO
====================================================
In ASP I can execute the parameter.. I just can't get the total back because I am unfamiliar with the syntax.
---------------------------------------------------
strConn = Session("dbConn"
set xConn = Server.CreateObject("ADODB.Connection"
xConn.Open strConn
Set rs=xconn.execute("myCounter " & 1)
---------------------------------------------------
How can I get the ASP code to return the count value of the sql stored procedure?