//declareunit QueryThr;interfaceuses
  Classes;type
  QueryThread = class(TThread)
  private
    { Private declarations }
  protected
    procedure Execute; override;
  end;implementation{ Important: Methods and properties of objects in VCL or CLX can only be used
  in a method called using Synchronize, for example,      Synchronize(UpdateCaption);  and UpdateCaption could look like,    procedure QueryThread.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }{ QueryThread }
uses DBForm;
procedure QueryThread.Execute;
begin
  frmMain.m_SQLCmd.ExecSQLCmd('select * from DataAss1 where 学费<3500');
end;end.//invoke
procedure TfrmMain.menuTestClick(Sender: TObject);
begin
 m_QueryThd.Create(false);//这里即错
end;