admin管理员组

文章数量:1402905

I don't understand why TAdsTable.Bof does not return True after a call to TAdsTable.AdsGotoTop. The question may seem stupid, but I want to understand the real reason why this happens. I'll give an example here from the help documentation about TAdsTable.AdsGotoTop:

TAdsTable.AdsGotoTop

Positions the given table to the first record.

Syntax

procedure AdsGotoTop;

Description

If no index has been set, the table is positioned at the top of its natural order. The record on which it positions is the first record starting from record 1 that satisfies current filter conditions. If an index is set, the table is positioned at the top of the current logical order, obeying both current filters and scopes.

Example

AdsTable1.Active := TRUE;

AdsTable1.AdsGotoTop;

{ note that this method is identical to the native Delphi method First }

It's said there that this method is identical to the native Delphi method First. But this is not true. For example, after calling First, the Bof function will return True but not False. This looks like a bug, but I am not fully sure about this.

There is an identical problem with the TAdsTable.AdsGotoBottom procedure. After a call to TAdsTable.AdsGotoBottom, the TAdsTable.Eof function returns False, but not True. After calling Last, the Eof function will return True. In fact, TAdsTable.AdsGotoBottom is not identical to the Last procedure, as mentioned in the help documentation.

The version of ADS is 11.1, if it matters.

Probably I'm missing out on something significant..

本文标签: