Subject | RE: [IBO] Open vs. First |
---|---|
Author | Jason Wharton |
Post date | 2004-11-16T05:43:14Z |
> Is there any reason why "First" instead of just "Open"?I'll toss in my $0.02.
Calling Open on a unidirectional dataset merely opens the cursor but does
not perform a fetch. Thus, you are sitting at BOF after calling Open with a
TIB_Cursor. If you call Open and then First you will open the dataset and
then when First is called it will actually check if the dataset (cursor) was
opened and if so it will Close it and then Open it and fetch the first
record. If you call First again it will close it again and open it and
fetch the first record. This is the only way it can assure you are on the
first record of the dataset is to do exactly this. It is not buffered and
so these events have an entirely different behavior than with a buffered
dataset.
Jason Wharton