-------------------------------------------------- -------------------------- Page inquiry ---- ---- Use the cursor implementation -------- Huang Zong Yin - - 2005.01.23 ------------------------------------------- ------------------------------ Alter Proc P_GETPAGE (@SQL NVARCHAR (4000), - Query Conditions, can query All content to @PAger int = 1, - Back to page @Size int = 2147483647 - Number of per page) AS set nocount on
Declare @Temp Int
Set @pager = (@ Pager-1) * @Size 1
Exec sp_cursoropen @temp output, @SQL exec sp_cursorfetch @temp, 16, @pager, @size exec sp_cursorclose @temp
Return @@ error