Subject Re: [IBO] Deactivate Detail Datasets (was: ...MasterSource)
Author Paul Vinkenoog
Hello Guido,

> Sorry for the misleading subject, but I want the detail-datasets to
> be prevented from updating when the master-dataset scolls.

Yes, I understood that from the content of your message.

> I have tested DisableControls, but the SQL-Monitor tells me, that
> the detail-datasets are refreshed when scrolling the master-dataset.

Very strange! Are you sure you have called DisableControls on the
MASTER dataset (or datasource) and not on the detail set(s)?

You see, I discovered that DisableControls blocks updating of detail
sets the hard way: I wrote a function that iterates over a number of
school classes and within each class over all the pupils. Typical
master-detail thing. I called DisableControls to prevent grid updating
while iterating. But the detail set always kept showing the pupils of
the first class. Couldn't understand why, because I (wrongly) assumed
that DisableControls meant just that: disable the CONTROLS and nothing
more.

Then I dove into the IBO Help and found out that what I saw was the
intended behaviour. I needed DisableInterface (which I'd never heard
of until then).

Now, this app has a monitor too so I just ran it again. And changed
four words of code to test the differences. My monitor shows that:

- If I use DisableControls (no matter if on master dataset or master
datasource) nothing goes over the wire regarding the detail sets.

- If I use DisableInterface I see the SQL to update the detail sets
every time the master set scrolls.


You don't have any event handlers (on master events) that steer the
detail sets, by accident? Because that would bypass DisableControls:
like I said before, DisableControls doesn't really disable controls
or datasets, it just disables notifications.


HTH
Paul Vinkenoog