Subject | [IBO] EOF BOF craziness |
---|---|
Author | Paul Hope |
Post date | 2003-09-08T13:13:24Z |
Hi
It seems crazy to me that I cant have a button calling TIB_Query.Next and not get an 'At end of dataset' error when it gets to the end.
I cant even do 'if not eof then next' because eof isnt true until after the next is processed.
I have to use (from the nav bar source)
with ib_query do
begin
if RowNum = EofRowNum - 1 then
begin
if not Unidirectional then ValidateRows( EofRowNum, EofRowNum );
end;
if Unidirectional or ( RowNum < EofRowNum - 1 ) then
Next
else
StateChanged;
end;
When calling Prior, bof similarly doesnt work as I expect - I have to use (RowNum=0)
Any suggestions of a more straight forward approach?
Regards
Paul
[Non-text portions of this message have been removed]
It seems crazy to me that I cant have a button calling TIB_Query.Next and not get an 'At end of dataset' error when it gets to the end.
I cant even do 'if not eof then next' because eof isnt true until after the next is processed.
I have to use (from the nav bar source)
with ib_query do
begin
if RowNum = EofRowNum - 1 then
begin
if not Unidirectional then ValidateRows( EofRowNum, EofRowNum );
end;
if Unidirectional or ( RowNum < EofRowNum - 1 ) then
Next
else
StateChanged;
end;
When calling Prior, bof similarly doesnt work as I expect - I have to use (RowNum=0)
Any suggestions of a more straight forward approach?
Regards
Paul
[Non-text portions of this message have been removed]