david.brent
Registered User.
- Local time
- Today, 07:56
- Joined
- Aug 25, 2004
- Messages
- 57
Sorry about this but I need your help.
I am looking for a way to return the number of rows from a select query to a variable in vbscript. I can get a value to return but it's not what I want. I get 1 if the SQL returned any Rows and 0 if it didn't.
I am using a RETURN VALUE parameter in my VB Script but I think the problem lies on the SQL side or more probably with me. If I fire a Stored Procedure containing a simple SELECT statement from SQL Query Tool, at the buttom of the Results I get a message like (14 row(s) affected). If I add RETURN @@Rowcount I get this message (1 row(s) affected). What I need (for paging purposes) is the value 14. I'd like to do it without firing two SQLs eg SELECT Count(*) and the the real SQL statement.
Anyone know how I can return the 14 and not the 1?
Thank You.
I am looking for a way to return the number of rows from a select query to a variable in vbscript. I can get a value to return but it's not what I want. I get 1 if the SQL returned any Rows and 0 if it didn't.
I am using a RETURN VALUE parameter in my VB Script but I think the problem lies on the SQL side or more probably with me. If I fire a Stored Procedure containing a simple SELECT statement from SQL Query Tool, at the buttom of the Results I get a message like (14 row(s) affected). If I add RETURN @@Rowcount I get this message (1 row(s) affected). What I need (for paging purposes) is the value 14. I'd like to do it without firing two SQLs eg SELECT Count(*) and the the real SQL statement.
Anyone know how I can return the 14 and not the 1?
Thank You.