Recordset is returning -1 recordcount
-
I have tried simple stored procedures to return recordset like : Select * From It is running good, giving proper out put. But If I am making it bit complicated then recordset is returning -1 recordcount e.g. : 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. Please Help me
Kiran Sajanikar
-
I have tried simple stored procedures to return recordset like : Select * From It is running good, giving proper out put. But If I am making it bit complicated then recordset is returning -1 recordcount e.g. : 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. Please Help me
Kiran Sajanikar
you seem to be asking the same question multiple times. show us all the necessary code as to how you are calling your priocedure and what your procedure looks like.
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
-
I have tried simple stored procedures to return recordset like : Select * From It is running good, giving proper out put. But If I am making it bit complicated then recordset is returning -1 recordcount e.g. : 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. Please Help me
Kiran Sajanikar
This is stored procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[test1]AS
--Select * From blog
Select Max(blogID) as cntId from blogASP code to call Stored procedure Code 1:
dim rsTemp, strSql strSql = "Exec test1"
set rsTemp = Server.CreateObject("ADODB.Recordset")
rsTemp.Open strSql, con, 1, 3
Response.Write rsTemp.RecordCountCode 2: ------------
dim cmd, rsTemp, strSql
set rsWork = Server.CreateObject("ADODB.Recordset")
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = con
cmd.CommandText = "test1"
set rsTemp = cmd.Execute
Response.Write rsTemp.RecordCountKiran Sajanikar
-
I have tried simple stored procedures to return recordset like : Select * From It is running good, giving proper out put. But If I am making it bit complicated then recordset is returning -1 recordcount e.g. : 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. Please Help me
Kiran Sajanikar