Subject Re: [IBO] calculateallfields bug? or problem on me
Author James
Hi Helen

Helen Borrie wrote:

> 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?

I have solve the problem. Yes you are right in writing a method that
performs the calculations I want and call from where I need it. I came
up with this ... ib_query.calculatefields method. and it works well.

I could like to discuss something to clarify some issues for the IBO
community. Not only when I call for post in dsssearch does the error
comes out. When I call for insert this error comes out also. If this
error happens because you say the OnCalculateFields is referring to a
null row, what is the main use of setting CalculteAllFields to true?

>
> 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
>
>
Warm Regards

James

>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> <http://rd.yahoo.com/SIG=12ceqscfg/M=267637.4116730.5333196.1261774/D=egroupweb/S=1705007183:HM/EXP=1071294084/A=1853619/R=0/*http://www.netflix.com/Default?mqso=60178356&partid=4116730>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/>.