Subject RE: [IBO] IBO & Update Trigger Problem
Author Alan McDonald
Eric have you thought about making the update trigger of the master do that
update work, and not the update trigger of the detail? I would have to admit
that I would never make my design work the way you state it does. It just
smells flawed. I suppose that if you have to do it this way, then why are
you making the update statement of the master include the field value which
is being controlled by the detail update trigger? Just remove it from the
update statement fo the master.

Sorry
Alan

-----Original Message-----
From: Eric Handbury <ehandbury@...>
[mailto:ehandbury@...]
Sent: Monday, 10 February 2003 8:31 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] IBO & Update Trigger Problem


Hello,

(IBO4_Hg, BCB6-SP2, FB1.0-796)

I have a problem with triggers and the UPDATE statement generated
by IBO. Here's the scenario:

1) I have a master-detail setup (ACMAIN and ACDETAIL) which is
really a 1-1 mapping.
2) User edits some information on the form which sets the state in
both datasets to dssEdit, and then user hits an Apply button which
does a CommitRetaining.
3) IBO generates and runs the UPDATE code for ACDETAIL. The Update
trigger for ACDETAIL modifies a field in ACMAIN.
4) IBO generates and runs the UPDATE code for ACMAIN, which
overwrites the change done in the ACDETAIL trigger code with the
value in its own buffers. So it basically wipes out the changes done
in the detail update trigger.

I have tried setting the bsBefore/AfterEdit BufferSynchroFlags in
ACMAIN, and have done a ACMAIN->InvalidateRowNum in the ACDETAIL-
>AfterPost() with no success.

How do I get IBO to use the correct field value in a Master UPDATE
which was changed in the Detail update trigger?

Thanks. Eric.



___________________________________________________________________________
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 http://docs.yahoo.com/info/terms/