CnPack Forum

#1 使用存储过程实现ADO分页
就一个存储过程代码，别的不说了，大家说说吧。
[code]
CREATE PROCEDURE [dbo].[sp_TablePaging]
(
@ATable VARCHAR(100),
@AFilter VARCHAR(1000),
@APage INT
)
AS
SET NOCOUNT ON
DECLARE @p1 INT, @PageSize INT, @sql VARCHAR(4000), @PageCount INT, @RowCount INT, @RecordCount INT
SET @PageSize = 100
SET @sql = 'SELECT * FROM ' + @ATable
IF @AFilter <> ''
SET @sql = @sql + ' WHERE ' + @AFilter
EXEC sp_CursorOpen @p1 OUTPUT, @sql, @ScrollOpt = 1, @CcOpt = ..

#1 >>Next Page

Forum:技术板块灌水区 ...
Thread:使用存储过程实现ADO ...
Next Thread:AAScrolltext

Home
Login

Powered by Discuz!