Subject Re: [IBO] calculateallfields bug? or problem on me
Author Helen Borrie
At 01:33 PM 12/12/2003 +0800, you wrote:
>Hi guys
>
>I have a ib_query.calculateallfields sets to true. If Iam not mistaken
>this will cause the calculated field to be recompute if any field were
>change. Since setting the calculateallfields to true, Iam encountering
>an error when I was to call post method on dsssearch state... the error
>reads something like access violation. Is this a bug or I have misuse
>the calculateallfields properties?

Not a bug, since calculated fields work fine. You post inserts, updates
and deletes...Exactly how are you calling Post in dssSearch? Is this just
an experiment, or do you have some particular workflow strategy in mind?

Probably you are getting the AV because OnCalculateFields is referring to a
null row. Calculated fields don't recompute unless you tell them to. Write
a DoCalculateFields method that performs the calculations you want and call
it from any event where you require the fields to be recomputed. Notice
that your method needs to operate on a Row object, so pass the row as an
input argument from your events (including OnCalculateFields).

HB