Subject Re: [IBO] TIB_DataSource.OnDataChange
Author Helen Borrie
At 12:15 AM 08-02-01 +0100, you wrote:
>Hi list.
>I'm getting AV when using
>if (Field.FieldName = 'XX') then begin ...
>in OnDataChange because Field = nil.

Why do you think Field = nil? The OnDataChange event passes a TIB_Column
variable called Field each time there is a data change in a row (note any
change, not just a modification).

>Is there any way to know which particular field that is changed and
>triggering the event?

Don't go this route - you are looking for a modified column in a row, not a
datachange event.

>When field XX is changed I wan't to update SQLWhere to filter a
>"lookup"-Query that is connected with keysource to another query.

Use the AfterPost event; or, better still, use DMLCaching to synchronize
the datasets.

>Maybe one should use params instead? If so, is there any difference in

Difference in performance from what? Params are used everywhere...


All for Open and Open for All
InterBase Developer Initiative ยท