W
WollyXF
Unregistered / Unconfirmed
GUEST, unregistred user!
现有一SQL SERVER 2000+服务器+客户端 的应用系统
我如何实现在客户端的后台查询呢?
以下代码报错说:'Error read from socket';那位大侠能帮我搞定,你的代码也可以。[]
type
TWThread = class(TThread)
private
FrmQ: TSocketConnection;
FdspQ: String;
FcdsQ: TClientDataSet;
FdsQ: TdataSource;
protected
procedure Execute;
override;
public
constructor Create(rm: TSocketConnection;pn:String;
cds: TClientDataSet;
ds: TDataSource);virtual;
end;
{ TWThread }
constructor TWThread.Create(rm: TSocketConnection;pn:String;
cds: TClientDataSet;
ds: TDataSource);
begin
inherited Create(True);
FrmQ:= rm;
FdspQ:= pn;
FcdsQ:= cds;
FdsQ:= ds;
FrmQ.Address:='210.75.40.172';
FrmQ.ServerName:='DZSW_SERVER.rdmDZSW';
FrmQ.Connected:= True;
FreeOnTerminate:= True;
Resume;
end;
procedure TWThread.Execute;
begin
inherited;
with FcdsQdo
begin
Close;
RemoteServer:= FrmQ;;
ProviderName:= FdspQ;
CommandText:= 'Select * from tblrk';
Open;
end;
end;
我如何实现在客户端的后台查询呢?
以下代码报错说:'Error read from socket';那位大侠能帮我搞定,你的代码也可以。[]
type
TWThread = class(TThread)
private
FrmQ: TSocketConnection;
FdspQ: String;
FcdsQ: TClientDataSet;
FdsQ: TdataSource;
protected
procedure Execute;
override;
public
constructor Create(rm: TSocketConnection;pn:String;
cds: TClientDataSet;
ds: TDataSource);virtual;
end;
{ TWThread }
constructor TWThread.Create(rm: TSocketConnection;pn:String;
cds: TClientDataSet;
ds: TDataSource);
begin
inherited Create(True);
FrmQ:= rm;
FdspQ:= pn;
FcdsQ:= cds;
FdsQ:= ds;
FrmQ.Address:='210.75.40.172';
FrmQ.ServerName:='DZSW_SERVER.rdmDZSW';
FrmQ.Connected:= True;
FreeOnTerminate:= True;
Resume;
end;
procedure TWThread.Execute;
begin
inherited;
with FcdsQdo
begin
Close;
RemoteServer:= FrmQ;;
ProviderName:= FdspQ;
CommandText:= 'Select * from tblrk';
Open;
end;
end;