灵
灵鸽
Unregistered / Unconfirmed
GUEST, unregistred user!
destructor TQueryThread.Destroy;
begin
CoUnInitialize;
inherited Destroy;
end;
procedure TQueryThread.Execute;
var
i: Integer;
j: string;
begin
CoInitialize(nil);
i := 1;
j := '☆';
UserManager.bsSkinListBox1.Items.Clear;
with UserManager.ADOQuery1do
begin
sql.Clear;
sql.Add(SqlStr);
open;
if (eof) and (bof) then
begin
application.MessageBox('未找到用户信息!', '提示', mb_iconwarning);
close;
Exit;
end;
while not eofdo
begin
if j = '☆☆☆☆☆☆☆☆' then
j := '☆';
if SotpQuery = True then
begin
close;
Exit;
end;
UserManager.bsSkinStatusPanel1.Caption := '正在搜索中' + j;
UserManager.bsSkinStatusPanel2.Caption := '找到用户数:' + inttostr(i);
UserManager.bsSkinGroupBox1.Caption := '用户列表(' + inttostr(i) + ')';
UserManager.bsSkinListBox1.Items.Add(fields[0].AsString);
i := i + 1;
j := j + '☆';
Next;
end;
close;
end;
UserManager.bsSkinListBox1.ItemIndex := 0;
end;
多线程查询的数据库公用模块怎么封将成为DLL?
还有怎么动态调用,请出例子谢谢。
begin
CoUnInitialize;
inherited Destroy;
end;
procedure TQueryThread.Execute;
var
i: Integer;
j: string;
begin
CoInitialize(nil);
i := 1;
j := '☆';
UserManager.bsSkinListBox1.Items.Clear;
with UserManager.ADOQuery1do
begin
sql.Clear;
sql.Add(SqlStr);
open;
if (eof) and (bof) then
begin
application.MessageBox('未找到用户信息!', '提示', mb_iconwarning);
close;
Exit;
end;
while not eofdo
begin
if j = '☆☆☆☆☆☆☆☆' then
j := '☆';
if SotpQuery = True then
begin
close;
Exit;
end;
UserManager.bsSkinStatusPanel1.Caption := '正在搜索中' + j;
UserManager.bsSkinStatusPanel2.Caption := '找到用户数:' + inttostr(i);
UserManager.bsSkinGroupBox1.Caption := '用户列表(' + inttostr(i) + ')';
UserManager.bsSkinListBox1.Items.Add(fields[0].AsString);
i := i + 1;
j := j + '☆';
Next;
end;
close;
end;
UserManager.bsSkinListBox1.ItemIndex := 0;
end;
多线程查询的数据库公用模块怎么封将成为DLL?
还有怎么动态调用,请出例子谢谢。