服务端改一下DatasetProvider.AllowCommondText.... :=True
改改客户端程序,
在客户端加多一个MEMO,再加现个按纽
procedure TDataSnapClientMainForm.Button1Click(Sender: TObject);
var
i:LongInt;
begin
cdsCustomers.DisableControls;
cdsCustomers.Close;
cdsCustomers.CommandText:=Memo1.Lines.Text;
i:=Gettickcount();
cdsCustomers.Open;
showmessage(floattostr( (gettickcount()-i)/1000.0));
cdsCustomers.EnableControls;
end;
procedure TDataSnapClientMainForm.Button2Click(Sender: TObject);
begin
cdsCustomers.DisableControls;
cdsCustomers.Close;
cdsCustomers.CommandText:=Memo1.Lines.Text;
cdsCustomers.Execute;
showmessage('dd');
end;