Subject | Re: [firebird-support] No Refresh with Calculated field and TClientDataSet |
---|---|
Author | Luis Fernando - HW Sistemas |
Post date | 2011-02-17T16:46:10Z |
Yes, this is the case. I was trying to use a Computed By sql field.
Now it worked with an internal calculated field in the TClientDataSet.
Thank you very much.
Luis F.
Em 16/02/2011 07:00, Svein Erling Tysvær escreveu:
Now it worked with an internal calculated field in the TClientDataSet.
Thank you very much.
Luis F.
Em 16/02/2011 07:00, Svein Erling Tysvær escreveu:
>[Non-text portions of this message have been removed]
> If you are talking about a field calculated in Firebird through
> COMPUTED BY, then what is sent to the client (your program) when you
> issue a SELECT is the value of this field, not the formulae. The
> client may not even know the field is computed and think it is just a
> separate field.
>
> The two possible ways to get the field updated, would be to either
> refetch the data (so that the server gets to calculate the value
> again) or do the calculation on the client (i.e. programmatically in
> your program).
>
> Set
>
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com>
> [mailto:firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com>] On Behalf Of Luis
> Fernando - HW Sistemas
> Sent: 15. februar 2011 22:12
> To: firebird-support@yahoogroups.com
> <mailto:firebird-support%40yahoogroups.com>
> Subject: [firebird-support] No Refresh with Calculated field and
> TClientDataSet
>
> Hi all, [Delphi2010 + DBExpress + FB 2.5]
>
> I am using a TClientDataSet (+Provider+SQLQuery) with a table that has a
> simple calculated field (it returns StrField1 + StrConstant +
> StrField2). I use DBCtrlGrid to view the data.
> When I edit a record and change StrField1 (with CDS.Edit and .Post,
> outside the grid), all the other edited fields are refreshed on the
> DBCtrlGrid, with the exception of the calculated field.
> If apply the updates, the new data is correctly there.
>
> I read many posts but couldn´t find a clue.
> Any help?
>
> Thanks,
> Luis Rocha
>
>