TBMH
Posts: 40
|
| Posted: 10/27/2008, 11:20 AM |
|
I want to limit the users search results to 100 rows. In SQL Server this is just using "Select TOP 100 *". How can I do this in CCS?
Thanks,
Scott
|
 |
 |
Gena
Posts: 591
|
| Posted: 10/27/2008, 11:36 AM |
|
Set "Records Per Page Property" for your Grid
_________________
Gena |
 |
 |
TBMH
Posts: 40
|
| Posted: 10/27/2008, 1:47 PM |
|
Thanks, Gena but that doesn't fix my problem. I probably should have been descriptive in my original post.
I have a search page that goes against a table that has about 200,000 rows. There are 5 different search criteria that a user can provide. The results grid is on the same page as the search dialog. A big problem in CCS is that when the page is accessed it loads the grid with results of a query with no search criteria (i.e. 200,000 rows). I have the page size set to 20 rows, however, the grids pager needs to determine the size of the data set so it will know how many pages to display. Therefore, it needs to select the enter table, get a record count, and then display 20 rows of data the user probably isn;t interested in.
If there is only one search criteria a workaround is to default the search criteria to an invalid value that doesn't return any rows. If you have multiple search criteria this doesn't work. The right answer would be make it so the search query doesn't run until the user hits the search button. I don't think this has been implemented, though.
|
 |
 |
Gena
Posts: 591
|
| Posted: 10/27/2008, 2:00 PM |
|
OK! Check "Use LIMIT/TOP Property" in the connection property.
_________________
Gena |
 |
 |
|