I am new to stored procedures and I am trying to get a record count from a recordset. Here is my stored procedure:
And here is my asp:
Any help would be much appreciated!
Bobba Buoy
Just trying to make sense of it all ...
Code:
CREATE PROCEDURE sp_run_total
(
@beg_date datetime,
@end_date datetime,
@mycount bigint
)
AS
SELECT @mycount = COUNT(*)
FROM RunTrng
WHERE (TrngDate BETWEEN @beg_date AND @end_date)
GO
And here is my asp:
Code:
'get number of run training sessions
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Exec sp_run_total '" & dBegDate & "', '" & dEndDate & "', '" & iRunTotal & "'", conn, adOpenStatic, adLockReadOnly
iRunTotal = rs.Recordcount
rs.Close
Set rs = Nothing
Any help would be much appreciated!
Bobba Buoy
Just trying to make sense of it all ...