You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/02 03:55:58 UTC

[GitHub] [shardingsphere] laersheng commented on issue #17973: use SQLServer Paging statements can cause some problems(Normal query does not cause problems)

laersheng commented on issue #17973:
URL: https://github.com/apache/shardingsphere/issues/17973#issuecomment-1144407712

   > @laersheng I didn't solve it. Are you using the same version?
   
   My version is 5.1.1.
   When using `Preparedstatement`, I found that shardingsphere did not correctly parse the paging parameters, and there was a problem with the index subscript. Maybe it was a bug.
   so I used `${currentPage} `, `${pageSize}` instead of `#{currentPage} `, `#{pageSize}`  in sql, and solved this problem, just like this: 
   `SELECT * FROM data_cell_quality_param ORDER BY id DESC OFFSET ${currentPage} ROWS FETCH NEXT ${pageSize} ROWS ONLY`
   
   you can try it like this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org