2005. augusztus 25., csütörtök

How to connect or disconnect all tables in a datamodule


Problem/Question/Abstract:

How to connect or disconnect all tables in a datamodule

Answer:

This should work:

for i := 0 to pred(components.count) do
  if (components[i] is TDataSet) then
    (components[i] as TDataSet).Active := not (components[i] as TDataSet).Active;

Nincsenek megjegyzések:

Megjegyzés küldése