Re: TQuery without form

From: John McCarten (nospam_at_please.co.nz)
Date: 02/27/04


Date: Sat, 28 Feb 2004 03:28:33 +1300


"pluton" wrote

> Can I use TQuery in formless unit?

> oSql.Create(nil); <== ERROR HERE

If you haven't worked it out yourself already, it goes like this:

constructor Bazka.Create();
begin
    inherited Create;
    oSql := TQuery.Create(nil);
 end;

destructor Bazka.Destroy;
begin
    oSQL.Free;
    inherited Destroy;
end;

j.



Relevant Pages

  • Re: Object Transform would be cool...
    ... constructor Create; ... destructor Destroy; override; ... Mother: Tmother; ...
    (alt.comp.lang.borland-delphi)
  • Re: TQuery without form
    ... > constructor Bazka.Create; ... > destructor Bazka.Destroy; ...
    (alt.comp.lang.borland-delphi)
  • Re: Component Resource Usage
    ... destructor TDsFancyButton.Destroy; ... >> and free method for creating the form. ... use the destructor to release any resources the component has acquired. ...
    (comp.lang.pascal.delphi.misc)