//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;
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;
解决方案 »
- 能帮忙把这些数据写入一下注册吗呀,谢谢了。
- 开发完成端口。WSAID_ACCEPTEX 怎么定义啊?
- 这么连接数据库为什么会出错了(ADO连SQL2000)
- 用delphi做在线编辑office的Activex控件
- 今天混了一下午CSDN,散200分
- 请教Rect 的作用
- 请问:使用sqlserver 可以使用exclusive 独占数据表吗?
- ★★屏幕取词源代码(for delphi)★★快去下载啦!
- 这样实现像QQ那样图表标闪烁
- 关于SQL语句:select max(fileid) from boxfile,请大家帮忙LOOK!
- 不能在指定的事件中获取新的事务
- 头疼3天,十万火急!关于serversocket 和clientsocket 网络连接问题,在线等待两个小时
begin
m_QueryThd = QueryThread.Create(false);
end;