Subject | Generators, Triggers, & TIBOQuery |
---|---|
Author | Don Gollahon |
Post date | 2001-01-26T02:34:12Z |
I'm using TIBOQuery. I have a master-detail setup as follows:
Master1 Link Table Master2
KeyID1 KeyID1 KeyID2
field1 KeyID2 fieldX
field2 fieldY
field3
This is a many-to-many relationship. I have a grid for Master1 on a form
and another grid to show what records from master2 are linked to it. I
insert a record in Master2 which has a generator and a trigger so IB will
automatically create a unique Key. After this new record is created KeyID2
is returned and passed to the Link Table to link Master1 to Master2 for this
new record. I'm getting an error on the applyupdates of the Link Table for
it's KeyID2. When I manually go look at the record that was inserted in
Master2 the KeyID2 is one higher than what was returned earlier. How is it
getting incremented twice? Any ideas?
Don Gollahon
(dlgllhn@...)
"What in Eternity does it matter?"
Master1 Link Table Master2
KeyID1 KeyID1 KeyID2
field1 KeyID2 fieldX
field2 fieldY
field3
This is a many-to-many relationship. I have a grid for Master1 on a form
and another grid to show what records from master2 are linked to it. I
insert a record in Master2 which has a generator and a trigger so IB will
automatically create a unique Key. After this new record is created KeyID2
is returned and passed to the Link Table to link Master1 to Master2 for this
new record. I'm getting an error on the applyupdates of the Link Table for
it's KeyID2. When I manually go look at the record that was inserted in
Master2 the KeyID2 is one higher than what was returned earlier. How is it
getting incremented twice? Any ideas?
Don Gollahon
(dlgllhn@...)
"What in Eternity does it matter?"