看别的好像没有问题,我看你的
select @strSql1 = 'select top' + cast(@pageTotalCount as nvarchar(50)) +'* from authors'
select @strSql2 = 'select top' + cast(@pagePrevCount as nvarchar(50)) + '* from authors'
top和后面的应该有空格吧,没有空格肯定出错,你试试看