Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Table.Bof and Eof don't behave the same |
Tue, May 24 2016 8:41 AM | Permanent Link |
Rolf Frei eicom GmbH | To loop a table for all records we can use this:
table.First; while not table.Eof do // do something table.Next; end; This works a expected. Now I must to the same but in reverse order. So I use this: table.Last; while not table.Bof do // do something table.Prior; end; This does not catch the last (first) record in the table. As soon the cursor is moved to the first record with Prior, Bof is true, which is wrong. It should get true only if we move the cursor to the prior not existing record as it is on the Eof call. Is this a EDB or a TDataset bug (XE4)? |
Tue, May 24 2016 9:06 AM | Permanent Link |
Rolf Frei eicom GmbH | Ouch!!! This was my fault. Everything seems to work correct.
I used a Filter and did change the filter field value in the loop. This will remove the record from the filter and automaticly moves to the next record. So an additonal Prior would give a Bof as it is already on the first record. |
Tue, May 24 2016 9:51 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Rolf
Welcome to the club - the number of times I've done that (or the equivalent of deleting rows as you go) - great fun. Almost as much fun as forgetting the .Next! Roy Lambert |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |