是不是括符的位置不對,第二個select top(
這裡的括號拿到intCurrentPageIndex前面試試
"select top 2 * from OtherFee where AutoId no in (select top "+(intCurrentPageIndex - 1)*2 +" AutoId from OtherFee)"
這裡的括號拿到intCurrentPageIndex前面試試
"select top 2 * from OtherFee where AutoId no in (select top "+(intCurrentPageIndex - 1)*2 +" AutoId from OtherFee)"
或者
"select top 2 * from OtherFee where AutoId not in (select top " + 2*intCurrentPageIndex - 2 +" AutoId from OtherFee)"