Subject Re: [IBO] end of dataset error
Author Helen Borrie
At 08:38 PM 23-09-02 -0700, you wrote:
>hi all,
>i have a problem with a report, my report is designed
>with a master and 2 detail subreports of that master.
>when i run the report the preparing dialog appears but
>then an eib_dataset error "at end of dataset" is
>invoked, i'm using bcb6 and ibo4_g. after stepping
>over the error the report generates fine. i'm not sure
>if its an frdsdataset error or a tib_dataset error
>(although its the tib_dataset that throws the error),
>i'm pretty sure it has something to do with a dataset
>calling next record where it should be checking eof
>somewhere, but i'm not sure if its the master or a
>detail invoking this...any help or insights on how to
>overcome this problem would be great.

You will need to do some debugging to find out where the error is
occurring; but you are probably looking at an empty dataset, viz. if you
call Open (on a query) or First (on a cursor) and are at EOF, then your
dataset is emptyl

In your report's OnNextRecord (or equivalent) event, you can test the
IsEmpty property on a query object or, on a cursor object, test

if ((object->BOF) and (object->EOF))

If you are iterating through a dataset, it should be enough just to test
for EOF, viz.

while (!object->EOF)


>Do you Yahoo!?
>New DSL Internet Access from SBC & Yahoo!
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Your use of Yahoo! Groups is subject to