Record not found or changed by another user

In the multi-tier areas there is a lot of discussion about this error and
similar ones, such as 'Unable to find record.'

I'm having the same problem with a CDS(stored)-provider-CDS set up on a
single datamodule.  I can get it to work for insert or modify, but not

I'm wanting to do some additional stuff to the record after the user has
entered data and before merginng the change log and saving the CDS(stored).
I've got a single field as the key (an index created through addIndexDef),
and it is required.  I've also got two additional fields that need to be
set on insert but not modify, and another two that get changed on both
insert and modify.  (created by and date, modified by and date).

The insert works when I use a before post handler to fill in this required
field, but then the modify reports the error.  If I try to move where I
fill in the required field to BeforeApplyUpdates, then for insert I get
field required error.  I've tried dozens of things, provider flags,
different places to do the changes I want to apply under program control,
and so forth.

Any suggestions?  I thought I'd found the solution in the Borland manual
(D6, page 24-9) where they show an example of a before apply updates to the
record, but on a modify, this gives a Field required error, since the Delta
doesn't have the key that is already there....

Brandon Smith