⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uquerythread.pas

📁 行业应急系统 包括: 应急系统(待遇核发) 发放系统 开发环境:Delphi5 (sp1)+ Oracle 8.05 MultiExport是一个可以将数据按指定字段倒出
💻 PAS
字号:
unit uQueryThread;

interface

uses
  Classes, db, dbTables;

type
  TQueryThread = class(TThread)
    qryYJBZ: TQuery;
  private
    { Private declarations }
  protected
    procedure Execute; override;
  public
    constructor Create;
  end;

implementation

{ Important: Methods and properties of objects in VCL can only be used in a
  method called using Synchronize, for example,

      Synchronize(UpdateCaption);

  and UpdateCaption could look like,

    procedure TQueryThread.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }

{ TQueryThread }

constructor TQueryThread.Create;
begin
  qryYJBZ := TQuery.Create(Application);
  FreeOnTerminate := True;
  inherited Create(False);
end;

procedure TQueryThread.Execute;
begin
  with qryYJBZ then
    try
    Synchronize();
    while (not Terminated) or (FieldByName().AsInteger = 1) do
    begin

    end;
  finally
    Free;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -