Board index » delphi » Question about DisableControls

Question about DisableControls

I have Master and Child Tables on a form, along with some DBEdits and a grid
for the child dataset.  They are linked together through the Mastersource of
the child table.

At the end of my process I want to move all the records from these tables
into other tables.
However, when I call disablecontrols for the tables, I can only get the
first master's records from the detail.  I call next for both tables, but
the detail table will not advance with the master.

What (if anything) am I doing wrong, and how can I fix it?



Re:Question about DisableControls

>>What (if anything) am I doing wrong, and how can I fix it?

Disablecontrols  prevents the updating of the detail cursor....

One solutions is to use TClientDataset.  You could then use
to create cursors for the datasets to be copied.     When you scan through
the cloned cursor,
the screen will not be updated....


Re:Question about DisableControls

Other solutions:

1- Set BlockReadSize (new, D4!) for the master table to a value greater than
0. When BRS > 0, the only accepted operation is Next.
2- Use two different datasources, one for the data-aware control and the
other for the M/D relationship. Then set DataSource1.Enabled := False for
the first datasource.

Other Threads