在这里搜索到了利用存储过程分页的代码,对于其中使用的sp_cursoropen等存储过程不了解,在sql联机丛书和msdn除了api系统存储过程等概述外,并没有具体的说明,如功能,参数,返回值等,我该如何找到其具体的细节解释,恳请指点.代码摘录如下:
/*--分页方法:
-- j9988(j9988) --*/declare @sqlstr nvarchar(4000), --查询字符串
@pagecount int,--第N页
@pagesize int--每页行数select @pagecount=3--第3页
,@pagesize=10--第页10条
,@sqlstr='select * from sysobjects'set nocount on
declare @P1 int,--P1是游标的id
@rowcount intexec sp_cursoropen @P1 output,@sqlstr,@scrollopt=1,@ccopt=1,@rowcount=@rowcount output
select @rowcount as 总行数,ceiling(1.0*@rowcount/@pagesize) as 页数,@pagecount as 当前页
set @pagecount=(@pagecount-1)*@pagesize+1
exec sp_cursorfetch @P1,16,@pagecount,@pagesize 
exec sp_cursorclose @P1