Subject | Re: [IBO] Displaying COMPUTED fields as a previous field is entered for the first time. |
---|---|
Author | Helen Borrie |
Post date | 2003-04-07T13:43Z |
At 10:39 PM 7/04/2003 +0930, you wrote:
Also, to avoid exceptions, you should set the COMPUTED attribute of the
column in the dataset editor. This tells IBO not to try to update it.
Delphi will let the user enter things into a VCL control that contains a
computed column, but it may cause an exception when the control updates the
dataset. You should avoid confusing the users by making the control
read-only. I always set a special colour (text, background or both) for
read-only controls or grid columns.
Helen
>Consider a table that has several fields followed by a COMPUTED field.The computed value that is output by the query.
>
>1. With a new record all fields that don't have defaults are NULL.
>(a) What do COMPUTED fields display in grids and IB_Edits?
>(b) Are COMPUTED fields automatically updated in the grid and IB_Edits?Only when you refresh the dataset - because they are *output* values.
>2. Editing an existing record:As above.
>(a) Are COMPUTED fields automatically updated as the fields they depend on
>are changed by the user?
Also, to avoid exceptions, you should set the COMPUTED attribute of the
column in the dataset editor. This tells IBO not to try to update it.
Delphi will let the user enter things into a VCL control that contains a
computed column, but it may cause an exception when the control updates the
dataset. You should avoid confusing the users by making the control
read-only. I always set a special colour (text, background or both) for
read-only controls or grid columns.
Helen