多线程查询
//==============================================================================
// 多线程查询 cxg 2008-09-26 14:29:42
//==============================================================================
unit uSelect;
interface
uses
sysUtils,ADODB,Classes;
type
TSelect = class(TThread)
private
FAdoConnection:TADOConnection;
FAdoquery:TADOQuery;
FSql:String;
protected
procedure Execute;override;
public
constructor create(AdoConnection:TADOConnection;AdoQuery:TADOQuery;Sql:string);
end;
implementation
{ Tselect }
constructor Tselect.create(AdoConnection:TADOConnection;AdoQuery:TADOQuery;Sql:string);
begin
inherited create(False);
FreeOnTerminate:=True;
FAdoConnection:=AdoConnection;
FAdoquery:=AdoQuery;
FSql:=Sql;
end;
procedure Tselect.Execute;
begin
with FAdoquery do
begin
Close;
SQL.Clear;
SQL.Add(fsql);
Open;
end;
end;
end.
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/archive/2008/09/26/2940816.html