sqlserver2000 分页存储过程 出错问题
create procedure pagination
(
@startIndex int,
@endIndex int,
@docount bit,
@tableName varchar(50),
@order varchar(50),
@where varchar(1000)
)
as
set nocount on
if(@docount=1)
select count(*) from "+@tableName+"
else
begin
declare @indextable table(id int identity(1,1),nid int)
set rowcount @endIndex
insert into @indextable(nid) select * from "+@tableName+" order by "+@order+"
select * from "+@tableName+" o,@indextable t where "+@where+"
and t.id between @startIndex and @endIndex order by t.id
end
以上是我用分页控件生成的存储过程,但是我改过之后,就出现问题了,不知道为什么出错,哪位大虾帮我看下!
set nocount off