Hardline
Posts: 24
|
| Posted: 01/05/2010, 5:02 AM |
|
I'm having a strange issue with the navigator, and it seems to have started when I upgraded to CCS 4.3. The grid will show a maximum of 20 records even if more are requested and selecting different pages does absolutely nothing. I thought I must've hard-coded this behavior somewhere in the page, so I created a new page and a new grid but I still have the same problem.
Any ideas?
|
 |
 |
Aleister
Posts: 73
|
| Posted: 01/05/2010, 8:23 AM |
|
Do you use grouping (GROUP BY) in the grid's SQL?
|
 |
 |
Hardline
Posts: 24
|
| Posted: 01/05/2010, 11:44 AM |
|
I do not, it's a simple SELECT * FROM [table].
I did see the other posts where CCS gets confused if GROUP BY is used, I thought I may have a similar problem, but I don't think so.
I just created a new project and tried paging... still the same.
I know for the fact the data is okay because I have queried the data using SQL Server's management tool and the result set is expected.
I should mention that if the page size on the grid is specified as a number below 20 records, let's say 5, the navigator will work as expected and page through all four pages until the 20th record is shown. After that, it stops paging.
Why 20 records?
|
 |
 |
Aleister
Posts: 73
|
| Posted: 01/05/2010, 12:39 PM |
|
I have no idea, it should work the way you do it. I think the best advice I can give you is to contact support.
|
 |
 |
ckroon
Posts: 869
|
| Posted: 01/05/2010, 1:03 PM |
|
Just an obvious thought.. have you checked the "records per page" and " page size limit" in the Data tab of the grid?
Scratch taht... since you can get to different pages.. I would do a search of the sql for "LIMIT" and see if any come up.
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Hardline
Posts: 24
|
| Posted: 01/05/2010, 1:14 PM |
|
Quote ckroon:
Scratch taht... since you can get to different pages.. I would do a search of the sql for "LIMIT" and see if any come up.
I thought this might be the problem before, so I uncommented the SQL debug code on line 155 of db_mssql.php which prints all SQL that is about to be executed. Nothing caught my eye.
Just for sh!ts and giggles, here's the SQL debug output that I just ran.
Debug: query = SELECT COUNT(*) FROM issue_iss
Debug: query = SELECT TOP 50 * FROM issue_iss
Debug: query = SELECT COUNT(*) FROM iss_history_hst
Debug: query = SELECT TOP 50 * FROM iss_history_hst
Nothing out of the ordinary here, I selected that 50 records per page be shown in each of the two grids, but of course, only 20 appear.
|
 |
 |
Hardline
Posts: 24
|
| Posted: 01/06/2010, 11:25 AM |
|
Well I feel stupid...
It was a php.ini setting, "mssql.batchsize" to be exact, I had it set to (drumroll) 20 because up until this project, I haven't needed pagination and 20 records was enough. Since the navigator does "SELECT TOP", the same records were being selected over and over again. I took off the limit and the navigator works.
|
 |
 |
datadoit
|
| Posted: 01/06/2010, 12:23 PM |
|
Watch that TOP/LIMIT in CodeCharge also where you set up your connections.
|
|
|
 |
|