Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 18 total |
Is there a limit on records returned from a Query? |
Fri, May 9 2008 12:10 AM | Permanent Link |
Dave | I was wondering if there was a limit on how many records were returned from a query.
I apply a SQL Query and it doenst display the complete list, it seems to display only 800 records But the list should be around 3000? Was wondering of this was a ElevateDB restriction? Thank you |
Fri, May 9 2008 2:50 AM | Permanent Link |
Dave | I am pretty sure the problem is with DBGrid1.DataSource.DataSet.Bookmark :=
DBGrid1.SelectedRows[i]; I am trying to loop through selected records but when its finished there I find that not all records were accounted for. But only happens when the filter displays many records, not on smaller lists. Dave <david@itfx.com.au> wrote: I was wondering if there was a limit on how many records were returned from a query. I apply a SQL Query and it doenst display the complete list, it seems to display only 800 records But the list should be around 3000? Was wondering of this was a ElevateDB restriction? Thank you |
Fri, May 9 2008 7:43 AM | Permanent Link |
Dave | I dont know why but I have just removed the order by clause from the SQL and it now works
fine. I have the latest version of elevateDB. Dave <david@itfx.com.au> wrote: I am pretty sure the problem is with DBGrid1.DataSource.DataSet.Bookmark := DBGrid1.SelectedRows[i]; I am trying to loop through selected records but when its finished there I find that not all records were accounted for. But only happens when the filter displays many records, not on smaller lists. Dave <david@itfx.com.au> wrote: I was wondering if there was a limit on how many records were returned from a query. I apply a SQL Query and it doenst display the complete list, it seems to display only 800 records But the list should be around 3000? Was wondering of this was a ElevateDB restriction? Thank you |
Fri, May 9 2008 10:44 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Dave
Out of interest did you check the query's .RecordCount and query plan? Roy Lambert [Team Elevate] |
Fri, May 9 2008 2:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dave,
<< I dont know why but I have just removed the order by clause from the SQL and it now works fine. I have the latest version of elevateDB. >> Is this a sensitive query result set, or insensitive query result set ? -- Tim Young Elevate Software www.elevatesoft.com |
Sat, May 10 2008 2:34 AM | Permanent Link |
Dave | Its the weirdest thing, I have a dbgrid with about 3000 records
The record count is perfect, the sum is perfect. BUT if I select all the records in the grid and loop through them, about 1000 records get unselected. If I do the same thing and take off the ORDER By everything goes fine, all records stay selected. Yes Tried the Request Sensitive in both states. "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Dave, << I dont know why but I have just removed the order by clause from the SQL and it now works fine. I have the latest version of elevateDB. >> Is this a sensitive query result set, or insensitive query result set ? -- Tim Young Elevate Software www.elevatesoft.com |
Sat, May 10 2008 4:23 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Dave
Can you post the code for the loop. Unless you're just doing a simple next it could be a testing problem. Roy Lambert |
Sat, May 10 2008 5:24 AM | Permanent Link |
Dave | Hi Roy,
If you take a dbGrid and fill it will a couple of thousand records, use what ever method you like to select all the records. Then use a simple loop to loop from first to last picking up values of only selected records. I find that for some reason some of the selected records get unselected and don't get counted. Oh and use a ORDER by in your SQL. You can see before looping that all records are selected, when it finished scroll up and I find alot of records have been mysteriously unselected. Now do the same thing without ORDER BY and everything is fine. Its a simple loop, and only happens when there are allot of records. I have tried it with a Bookmark and by simply looping through the records and checking if the current is selected. And it happens with both. It may be something that I am doing but, as I said it is a simple loop from first to eof checking only if selected in the grid. And doesnt go wrong if I remove the ORDER BY. Using a standard DBGrid. Fortunately I dont really need the order by clause, so I am saved but thought you might throw some light. Thanks again Roy Lambert <roy.lambert@skynet.co.uk> wrote: Dave Can you post the code for the loop. Unless you're just doing a simple next it could be a testing problem. Roy Lambert |
Sat, May 10 2008 9:21 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Dave
I was about to have a try then I started thinking >If you take a dbGrid and fill it will a couple of thousand records, use what ever method >you like to select all >the records. A DBGrid has only one way to select multiple records that I know of and that's ctrl-click with dgMultiSelect set to True in Options. I can't see anyone doing that so obviously you're doing it in code? >Then use a simple loop to loop from first to last picking up values of only >selected records. How are you determining if they are selected? >I have tried it with a Bookmark Can you expand on this? >and by simply looping through the records and checking if >the current is selected. How? Finally when you've selected your records what's the value of query.recordcount and dbgrid.selectedrows.count? Roy Lambert [Team Elevate] |
Sat, May 10 2008 9:26 AM | Permanent Link |
Dave | Here is how I select all the records mate.
procedure DBGridSelectAll(AGrid: TDBGrid) ; begin AGrid.SelectedRows.Clear; with AGrid.DataSource.DataSet do begin DisableControls; First; try while not EOF do begin AGrid.SelectedRows.CurrentRowSelected := True; Next; end; finally EnableControls; end; end; end; //Usage: //DBGridSelectAll(DBGrid1) ; and see this code http://www.scalabium.com/faq/dct0043.htm This is how I tried to run through all the selected records. Thanks again |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, May 15, 2024 at 08:40 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |