Subject Re: EDatabaseError: Field ‘ID’ not found in TClientDataSet and TIBOQuery
Author lalopus
Hi, maybe you can define the count(*) as an aggregate field on the
clientdataset.
Also, maybe you could try to uncheck the "KeyLinksAutoDefine" from
the IBOQuery and setting it to RequestLive = False
But be warned: delphi hung up while I was testing this stuff.

regards
eduardo

--- In IBObjects@yahoogroups.com, "kokok_kokok" <kokok_kokok@y...>
wrote:
>
> In a simple form, I have a TClientDataSet connected to a TIBOQuery
> via TDataSetProvider.
>
> The SQL in TIBOQuery is only "SELECT COUNT(*) FROM TABLE1"
>
> When I call ClientDataSet.Open, the message "EDatabaseError:
> Field `ID' not found" appears. ID is the primary key of the
TABLE1.
> This error is thrown in TIBODataSet.PSGetIndexDefs function. I
> suppose that IBO is trying find the index field but does not find
it,
> but in fact, I think that is not necessary.
>
> I only want the number of registers via TClientDataSet because I
> cannot access to TIBOQuery directly.
>
> Thanks in advanced