Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Store Proc. - returns [-1] as pagecount

Author  Topic 

abarsami
Yak Posting Veteran

68 Posts

Posted - 2001-01-15 : 16:18:27
I have written a stored procedure that uses a cursor to fetch each row in a table until [fetchstatus <> -1]. After it gets all the rows, I run an execute statement in my asp code that returns the result set of the stored procedure. But, when I want to use [rs.absolutepage] or [rs.pagecount]. It is always [-1]. Any ideas??

cwalker
Starting Member

1 Post

Posted - 2005-06-09 : 11:11:00
quote:
Originally posted by abarsami

Fixed - everything works now including absolute page... :-)



Anyone have sample code for this?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-06-09 : 14:48:10
No, but the better approach is to not use cursors in a stored procedure. The original problem was essentially a conflict between the two cursors...one server-side and the other client-side. Avoiding the server-side cursor avoids the problem.
Go to Top of Page
   

- Advertisement -