EnterpriseDBDAC
Example: DataSetCount, DataSets | | Previous Next |
The following code fragment illustrates how DataSets and DataSetCount can be used to ensure that an action is taken for every open dataset that is a table. After that all open datasets will be closed.
var
I: Integer;
begin
with EDBDatabase1 do
begin
while DataSetCount <> 0 do
begin
if DataSets[0] is TEDBTable then
begin
// Some code
end;
DataSets[0].Active := False;
end;
end;
end;