Recordset returning -1 recordcount from Sql Structured Query in Classic ASP - TechRepublic
Question
April 3, 2009 at 12:41 AM
kiranaks82

Recordset returning -1 recordcount from Sql Structured Query in Classic ASP

by kiranaks82 . Updated 17 years, 3 months ago

I have tried simple stored procedures to return recordset

Select * From bTable

It is running good, giving proper out put.

dim rsTemp, strSql
strSql = “Exec test1”

set rsTemp = erver.CreateObject(“ADODB.Recordset”)
rsTemp.Open strSql, con, 1 , 3
Response.Write rsTemp.RecordCount
con.close
set con = nothing

This code is returning me 15 record count

But If I am making it bit complicated then recordset is returning -1 recordcount

Select Count(bId) as cntBid from bTable

This stored procedure is running well in SQL Server 2005, but if I am caling them in ASP pages it is returning me -1 recordcount.

It is very urgent, Please Help me

This discussion is locked

All Comments