Link to home
Start Free TrialLog in
Avatar of hidrau
hidrauFlag for Brazil

asked on

What is the best way to do this in Delphi?

I need to create a adoquery in execution time.

what is the best way to create, with application or nil in create?

var
  TQ : Tadoquery;
begin
  TQ := Tadoquery.create(Application)

  OR

  TQ := Tadoquery.create(Nil)
end;



End to destoy it?

TQ.Close;
FreeAndNil(TQ)

Or

TQ.free


Thanks
ASKER CERTIFIED SOLUTION
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hidrau

ASKER

ok, I understood - thanks
Avatar of hidrau

ASKER

thanks