Subject Re: [IBO]Help !! Record not located to update
Author Helen Borrie
At 04:19 PM 17/10/2004 +0100, you wrote:

> Hi all,
> I have the 'Record not located to update ' exception when I try to delete
>or post an update to a record
> that I just inserted in an IB_GRID and if the primary key is bound on a
> generator.
> You can test this with the sample projet book.dpr and the database
> ibook.gdb.
>If you insert a book using the IB_GRID you can't immediatetely update or
> delete it.
> If you look carefully you will see in fact TWO records one on the top
> (provided you were on top before inserting) and one
> in the bottom.
> You can delete or update the one in the bottom.
> May be it's a problem of synch of the buffer with the IB_GRID?

Until the "inserted" record has been posted to the database, it only exists
in the buffers. Use Cancel to get rid of it (the red "X" button on the
UpdateBar).

The one that you *can* delete/update has been posted, so the Update or
Delete statement is able to find it.

The default behaviour in the grid is to post a changed or edited record
when you scroll off it. If the transaction is in Autocommit, then the Post
operation also causes the transaction to be committed and then restarted.

Helen