Subject Re: [firebird-support] delphi and firebird, instruction with... do
Author Alexandre Benson Smith
Geomastique wrote:
> hello,
> i use delphi and IBX component for a small application with a firebird
> 1.5 database.
> i have 2 IBdataset and i want to execute the same instruction for both
> IBdataset.
> so i write :
>
> with ibdataset1, ibdataset2 do
> begin
> .... somethings to do;
> .... etc;
> end;
>
> it does not works, the instructions are done for ibdataset2 only...
>
> thanks for your help.
>
>

This is a Delphi related question.

It has nothing to do with FB.

the WITH keyword is just a shortcut to the objects properties and
methods. The above code is just like this:

ibdatabase2.somethings to do;
ibdatabase2.etc;

the search order for the "shor-cut" is the reverse order in the WITH list, i.e. the last one will be the first used.

see you !



--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br