Subject Re: [firebird-support] Re: Accessing tables across databases
Author David Johnson
Try this rework (sorry about any syntax errors - It's been over a year
since I did any object pascal).

This should be faster since there is only one prepare (on formCreate),
and less wire traffic.

I would look at limiting the transaction length too, unless your
installation is very small.

onFormCreate:

with qGuests do
sql.add('select * from Guests');
sql.add('where auctionID=:AuctionID and
constituentID=:ConstituentID');
prepare;
end;

onRunQuery:

with qGuests do
close;
params.clear;
params['AuctionID'] := qAuction.fieldbyname('AuctionID').asstring;
params['ConstituentID'] :=qAuction.fieldbyname
('ConstituentID').asstring;
open;




On Thu, 2005-08-11 at 17:07 -0700, Sam Hunt wrote:
> with qGuests do
> begin
> close;
> sql.clear;
> sql.add('select * from Guests');
> sql.add('where
> auctionID='+#39+qAuction.fieldbyname('AuctionID').asstring+#39+' ');
> sql.add('and
> constituentID='+#39+qConstituents.fieldbyname
> ('constituentID').asstring+#39+'
> ');
> open;
> end;