Subject Re: TIB_Cursor and TIB_Dataset no data at run time
Author clivewalden
OK. I found the answer.
set AutoFetchAll := False

Clive

--- In IBObjects@yahoogroups.com, "clivewalden" <clivew@c...> wrote:
>
> Background:
> I have a TIB_Cursor which I am passing to one of my classes as a
> TIB_Dataset.
> AutoFetchAll = True
> AutoFetchFirst = True
> ReadOnly = True
> RequestLive = False
>
> I set the SQL dynamically then call
> FDataset.SQL.SaveToFile('datasetSQL.SQL'); // For debug
> FDataset.Prepare;
> FDataset.First;
>
> I get no data back.
> EOF = True
> If I try to access the field values I get an exception.
>
> I have tried casting back to a TIB_Cursor; but that made no difference.
>
> In the IDE, if I Edit the TIB_Cursor and paste the contents of the
> saved file ('datasetSQL.SQL') into the SQL of the Cursor tab I get the
> correct data that I expect at run time.
>
> What am I missing?
>
> Many thanks,
> Clive.
>