//==============================================================================
// 多线程查询 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.