Subject Re: [IBO] Master detail on IBO
Author Geoff Worboys
> in IBX I encountered that sometimes when iam going to save
> all the newly added record including the master and the
> detail dataset, sometimes not all records in detail dataset
> are inserted? they disappear... and when editing all of the
> edited detailed table have save ...
...
> if were going to save a record, which should be save first?
> master or detail? should they be commited right way? before
> saving the other one?


Weird things can happen if you dont have your keys and
relationships set up properly or if you have triggers that
override key values and so on.

But no, I have not had master/detail problems with IBO for
a long time. IBO implements a feature called PostRetaining
that posts a master dataset row to the database and retains
insert state at the client (and deletes the row if the insert
is cancelled). This arrangement allows forms to be setup so
that the user does not need to remember to explicitly post
the master before working on the detail - and allows you to
write forms that hide such details from the user.

Mind you, postretaining can cause problems in certain (rare)
situations. For example I usually prevent users from deleting
rows in the database, this means that the automatic delete
when a user cancels an insert of a postretained master will
raise an error. The only way out is a rollback - which is
normally fine in the situations I have met the problem.

--
Geoff Worboys
Telesis Computing