Subject Re: [IBO] BufferSynchroFlags behavior
Author jwharton@ibobjects.com
I'm not entirely clear on what exactly your problem is.
Will you try and put it in more simple and direct terms?
Perhaps you could also post a ZIP file to the group with an example?

Jason Wharton

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Good day.

As someone has suggested me to use this property to solve my previous
problem, I found out that there are some behavior that I don't
understand why such thing happen.

I have a ib_query dataset name invdetails. In this dataset I have a
field that is computed field(is computed field the right term?) In my
previous problem when a new record is inserted or after an edit, the
computed field doesn't display right away the value that it should be
until I ib_transaction.refresh(true);. So I set the BufferSynchroFlag to
afterinsert, and afteredit, and I was't able to solve my problem. the
computed field display the value right away even without committing it.

But this problem comes out after setting the BufferSynchroFlags. After a
record is after. I immediately use the some of the record's column value
to my computation, like this
newtotalamount:=newtotalamount+invdetails.FieldByName('subtotal').AsCurrency;.
Before setting the BufferSynchroFlag this use to work fine, but after
setting it, it doesn't work anymore. Because the
invdetails.FieldByName('subtotal').AsCurrency give me a value of
0(zero). But when I set the BufferSynchroFlag properties back, the
invdetails.FieldByName('subtotal').Ascurrency give me the value that it
should be.

What I don't understand is why does the
invdetails.FieldByName('subtotal').AsCurrency gives me a value of 0
while in the datacontrols you can see the value in it.

Is there something I should know?


Regards,
James