Subject | Re: TBOQuery and TClientDataset bug? |
---|---|
Author | Jackson Gomes |
Post date | 2004-03-09T12:18:42Z |
> The problem is, when I set the Active property to TRUE at runtime,I had the same problem and it seems a TIBOquery bug. I did the follow
> I obtain an exception with the following message:
> "The qItemOnHand: field 'WarehouseID' not found"
in order to avoid the problem.
1. Select all fields from the table
>> Select *2. Add Persistent Fields for all fields
>> From Itemwarehouse
>> Where ItemID = :ItemID
>> Group By ItemID
3. Change the FieldKind property to ftCalculated
4. Go back to your SQL and add your agregate function again
>> Select ItemID, SUM(Quantity) AS OnHand5. Add all fields again, but dont remove the fields added on step 2.
>> From Itemwarehouse
>> Where ItemID = :ItemID
>> Group By ItemID
It seems TIBOQuery passes all fields to the ClientDataset, even if
they aren't in the Select clause.
It worked for me. I also needed to implement the IProviderSupport in
order to make it updateble. It seems TIBOQuery does not have such
interface.
Regards.
Jackson Gomes
Tools&Comps - Security Components for Borland Developers.
Web Site: http://www.toolsandcomps.com
Our Forum: http://groups.yahoo.com/group/toolsandcomps
e-mail: jackson@...
Phone: 55 27 99602760 / 55 27 33891138