Subject | Re: [IBO] Problem in IsEmpty method |
---|---|
Author | Jason Wharton |
Post date | 2001-11-21T19:04:09Z |
> I think there is a small problem with 'isempty' in tib_query.What if you change this method to this:
function TIB_BDataset.GetIsEmpty: boolean;
begin
Result := not Prepared or
not IsSelectSQL or
( BufferRowCount = 0 );
end;
(Look in IBA_BDataset.IMP)
Now for some blah blah to tell why...
The problem I think is because the code in there before was based on an
assumption that there would always be a record at the RowNum = 1 position.
With the new capability of IBO 4 to virtualized a dataset as it does, it is
possible to have a valid dataset from RowNum = 2 through 10, for example. In
this case, it surely isn't empty but my test here wasn't comprehensive
enough. This wasn't discovered because in most cases there is a RowNum = 1
but you found a combination which utilized the new features and revealed
this area I had not enhanced to support the new capabilities.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com