Subject Re: [IBO] Looping thru queries in DM
Author Florian Hector
> I remember seeing a neat little while loop structure somewhere in
> the IBO samples or tutorials (I thought) which opened all queries
> which existed in the datamodule.
> I can't find it or maybe it had nothing to do with IBO..
> can anyone remember seeing such a loop?
>

with DM do
try
begin {with DM do}
if not cnTermine.Connected then cnTermine.Connect;
for i := 0 to ComponentCount - 1 do
if Components[i] is TIB_Query then
with Components[i] as TIB_Query do
if not Active then
begin {if not Active}
prepare;
Open;
end; {if not Active}
end; {with DM do}
except
MessageDlg('Query '+ Components[i].Name +' macht Probleme', mtError,
[mbOK], 0);
end;

That's a snipplet of code taken from GSG.

Florian