Best way to clear cache of detail (child) table

I would like to check what the best way is to clear the datable cache of a detail table.

I have several TDADataTable classes that are linked via master-detail link.

I have a grandparent table G, a parent table P and a child table C.

At some point I loop over P and change the database table C via a method other than the child table C object.

After the operation I want to clear the cache of the C records.

What is the best approach to do this?

  1. Call G.P.C.Refresh(); a single time (for a datatable cursor pointing to an arbitrary P record)
  2. Call G.P.C.Close(); followed by G.P.C.Open(); a single time (for a datatable cursor pointing to an arbitrary P record)
  3. Call C.Refresh(); or C.Close();C.Open(); for each P record that was impacted?
  4. Other solution?

Note: Claude suggested option 1 and said the Refresh() option might work

Hi,

Claude’s recommendation is correct - table.Refresh is enough.