建议分别print出拼接动态SQL各个参数的值: @orderstr, @fields, @tablename, @StartRecord, @pagesize
如果其中一个的值是null, 那么拼接出来的@sql就是null, print @sql就返回空值.