Subject RE: [IBO] Foreign key
Author Helen Borrie
At 10:48 AM 20-08-02 +1000, you wrote:
>One last thing. After I add a new record in a grid I would like the record
>to be committed and the contents of the grid refreshed.
>* Which properties deal with post / commit (I don't see separate buttons on
>the bars so I don't know when the data is being posted compared to being

You can set AutoCommit to true on the ib_connection.

>* Which properties deal with refreshing the grid after a commit.

The Refresh method, the RefreshAction property and the CommitAction
property; but also transaction isolation and style of committing come into it.

>I have set the CommitAction to caRefresh on my query but the data is not
>reflected - is there a transaction mode I need to change?

CommitAction should happen after a "hard" Commit completes, i.e. (I think)
it should invalidate the changed rows and pull up the new versions of those

CommitRetaining, OTOH, commits but keeps the same view of the database. To
get a refreshed view each time, you'd need to change the Isolation property
of the ib_transaction to tiCommitted ("read committed"). tiConcurrency
retains a "stable view" until a hard commit is called. (Hard commit - call
Commit instead of CommitRetaining).

With Autocommit, you get CommitRetaining, so changing the isolation level
is the solution to avoid a full Refresh (sometimes expensive).