Subject RE: [IBO] Lookup problem
Author Helen Borrie
At 07:03 PM 03-09-02 +1000, you wrote:
>Helen,
>
>The emails didn't arrive for several hours and then they were out of
>sequence.
>
>I have 3 tables. Two are master/detail and the other is a lookup. If I add
>data to the lookup table then the column in the detail table cannot see this
>new record unless I close/open the queries again.
>
>I did send an email with my transaction settings etc but so far that email
>has gone astray.
>
>I'm basically asking the best way to handle the situation. I know this has
>something to do with transactions (my Isolation setting is currently "read
>committed")

ReadCommitted is right for this. What settings do you have for the
BufferSynchroFlags of the two datasets? Including bsBeforeEdit in the set
for dataset that is "looking for" the lookup values and bsAfterInsert in
the lookup set should provide what you need.

After the insert to the lookup set, call its RefreshKeys method so that the
Keylinks buffer gets updated and makes the new row visible to the polling
dataset. It should not be necessary to perform at full Close and Open; at
least see whether just refreshing the Keys buffer does what you need.

Do make sure that your Keylinks settings are perfect. The synchro flags
and RefreshKeys depend on that.

From this and other threads of yours, it seems worth making the point that
many of the specialised IB data-aware controls provide their "specialised"
behaviour in response to a particular dataset mode. Lookup controls aren't
principally designed to provide an editing interface. Like the
IB_Searchxxxxx controls, they are designed for specific modal response. I
should also check that you understand that a lookup control only becomes
"operational" when the polling dataset is in Edit or Insert mode - just as
a Search control only provides its search-specific characteristics when the
dataset is in search mode.

Helen