Subject | Re: TBOQuery and TClientDataset bug? |
---|---|
Author | gifernandezmx |
Post date | 2004-03-09T16:03:11Z |
Jackson,
Thank you very much for your tip. I applied it and I think it is a
great solution. Maybe Jason will fix the bug in next versions.
Taking advantage of your attendance, please could you review the
message number 29837 and tell to me what you think on the matter?
Thanks in advanced
Gerardo Fernandez
--- In IBObjects@yahoogroups.com, "Jackson Gomes" <jackson@t...>
wrote:
Thank you very much for your tip. I applied it and I think it is a
great solution. Maybe Jason will fix the bug in next versions.
Taking advantage of your attendance, please could you review the
message number 29837 and tell to me what you think on the matter?
Thanks in advanced
Gerardo Fernandez
--- In IBObjects@yahoogroups.com, "Jackson Gomes" <jackson@t...>
wrote:
> > The problem is, when I set the Active property to TRUE atruntime,
> > I obtain an exception with the following message:follow
> > "The qItemOnHand: field 'WarehouseID' not found"
>
> I had the same problem and it seems a TIBOquery bug. I did the
> in order to avoid the problem.2.
>
> 1. Select all fields from the table
>
> >> Select *
> >> From Itemwarehouse
> >> Where ItemID = :ItemID
> >> Group By ItemID
>
> 2. Add Persistent Fields for all fields
>
> 3. Change the FieldKind property to ftCalculated
>
> 4. Go back to your SQL and add your agregate function again
>
> >> Select ItemID, SUM(Quantity) AS OnHand
> >> From Itemwarehouse
> >> Where ItemID = :ItemID
> >> Group By ItemID
>
> 5. Add all fields again, but dont remove the fields added on step
>in
> 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
> 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@t...
> Phone: 55 27 99602760 / 55 27 33891138