Subject RE: [IBO] Re:TCDSProvider does not like TIBOQuery
Author Roger Vellacott
Perhaps you have IBOQuery.RequestLive set to true.

If so, then IBO is trying to work out update queries, for which it needs the primary key field value.

Roger Vellacott

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of Hans
Sent: 15 August 2010 06:45
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Re:TCDSProvider does not like TIBOQuery



IB_SQL gladly accept and properly calculates:

SELECT SUM(QTY_INITIAL) FROM INVENTORY WHERE QTY_INITIAL <> 0

No UniqueKey or and indexed field used, shown plan:

PLAN (INVENTORY NATURAL)

----- Original Message -----
From: "Helen Borrie" <helebor@...<mailto:helebor%40iinet.net.au>>
To: <IBObjects@yahoogroups.com<mailto:IBObjects%40yahoogroups.com>>
Sent: Saturday, August 14, 2010 10:20 PM
Subject: Re: [IBO] Re:TCDSProvider does not like TIBOQuery

> At 12:41 PM 15/08/2010, you wrote:
>>Hi Helen,
>>This is typo error on my email, however my TIBOQuery is correct, as
>>follow.
>>
>>Select sum(amount) Tamt from SaleRevenue
>>where region = 'West'
>>
>>
>>Problem: TIBOQuery looking for the primary key
>>that is not listed in the select clause
>
> It's looking for a unique key, not necessarily the Primary key. A set
> with only one non-unique field is no use to a client application.
>
> Try
>
> select sls_id, sum (amount)
> from SaleRevenue
> Where region = 'West'
> group by 1
>
> and set the KeyLinks property explicitly to sls_id
>
> Note that this is NOT an updatable set so it's possible that the
> TCDSProvider is set to read-write and is complaining because it cannot
> establish a key field on which to base a searched update.
>
> HB
>
>
>
> ------------------------------------
>
> __________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>



[Non-text portions of this message have been removed]