TDatabase: DataSetCount, how it works ?

This is a copy from Delphi's help:

"   For example, the following code fragment illustrates how
DataSetCount can be used   to ensure that an action is taken for every
open dataset that is a table:

var

I: Integer;
begin
with Database1 do
for I := 0 to DataSetCount - 1 do
if DataSets[I] is TTable then
DataSets[I].CachedUpdates := True;
end;
"

...but I can't make it work. The problem is very strange: I have 2
tables Table1 and Table2 connected to the database but the action is
taken 2 times for only Table1.
When I executed the code step by step I find out  that DataSets[0] =
DataSets[1] = Table1
Do I missing something ? Can anyone help please ?

Vassilis Samaltanos
Digital Flow