Subject | Re: [IBO] EOF BOF craziness |
---|---|
Author | Daniel Rail |
Post date | 2003-09-10T01:14:44Z |
Hi,
At September 9, 2003, 21:38, Paul Vinkenoog wrote:
Empty Dataset: BOF and EOF are both true.
At least One row:
1. After opening dataset both BOF and EOF are false.
2. Call First, BOF is set to True and EOF is False, because to get
to the first row and make sure that it is the first row, the cursor
has to go past the first row.
3. Call Last, EOF is set to True and BOF is False, because to get
to the last row and make sure that it is the last row, the cursor
has to go past the last row.
4. Call Prior, BOF is set to True because trying to go past the
first row fails and EOF False because the cursor is not past the
last row.
5. Call Next, EOF is set to True because trying to go past the last
row fails and BOF False because the cursor is not past the last row.
For me this is not that confusing.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At September 9, 2003, 21:38, Paul Vinkenoog wrote:
>> "Test Eof (end-of-file) to determine if the active record in a datasetYes you can still use the "BOF and EOF" condition.
>> is the last record. If Eof is True, the current record is
>> unequivocally the last row in the dataset. Eof is True when an
>> application:
>>
>> - Opens an empty dataset.
>> - Calls a datasetÂ’s Last method. (Unless it is a unidirectional
>> dataset)
>> - Call a datasetÂ’s Next method, and the method fails because the
>> current record is already the last row in the dataset.
>> - Calls SetRange on an empty range or dataset.
>>
>> Eof is False in all other cases.
>>
>> Tip: If both Eof and Bof are True, the dataset or range is empty."
>>
>> And, the equivalent can be said for the BOF property.
> Thanks for the information. Actually, it was a bit lazy of me to ask
> the question, because I could have looked it up too...
> Still, these helptexts leave some questions open. For instance: if Eof
> is true when you are on the last record, and Bof when you are on the
> first, Eof and Bof should both be true when you are on the only record
> of a singleton set. But if that were the case, you couldn't use the
> "Bof and Eof" condition to test for an empty set.
Empty Dataset: BOF and EOF are both true.
At least One row:
1. After opening dataset both BOF and EOF are false.
2. Call First, BOF is set to True and EOF is False, because to get
to the first row and make sure that it is the first row, the cursor
has to go past the first row.
3. Call Last, EOF is set to True and BOF is False, because to get
to the last row and make sure that it is the last row, the cursor
has to go past the last row.
4. Call Prior, BOF is set to True because trying to go past the
first row fails and EOF False because the cursor is not past the
last row.
5. Call Next, EOF is set to True because trying to go past the last
row fails and BOF False because the cursor is not past the last row.
For me this is not that confusing.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)