Subject Re: [IBO] Edit after insert/post
Author Jason Wharton
Stewart,

> After the second post I get an exception 'record not found for update'
>
> My understanding was that after the insert, the current record
> pointer was on the record just posted so a call to table1.edit would
> place the record I have just edited into edit mode - thus allowing me
> update the contents of the record. However, this error would seem to
> point to this not being the case.
>
> Would anybody be able to explain what actually happens after and
> insert and what is the correct way to carry out this type of
> operation.

Your columns in the KeyLinks were not supplied prior to the insert.
Therefore, the client doesn't know how to locate the record on the server to
update it. You may also have a trigger that does something to confuse the
client. Make sure you check for NULL before assigning any value in an insert
trigger.

Use the GeneratorLinks property to supply those values at the right time.
Then, it will have the values to use to update the record with when it needs
them.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com