unit ClientForm;
interface
uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DBXDataSnap, IndyPeerImpl,
  Data.DBXCommon, Data.DB, Data.SqlExpr, Vcl.StdCtrls;

type
  TForm2 = class(TForm)
    SQLConnection1: TSQLConnection;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation
uses
  Data.DbxCompressionFilter, ClientClasses;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
  SQLConnection1.Connected := True;
  try
    with TMyServerMethodsClient.Create(SQLConnection1.DBXConnection) do
    try
      ShowMessage(
        EchoString(DateTimeToStr(Now)))
    finally
      Free
    end;
  finally
    SQLConnection1.Connected := False;
  end;
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  SQLConnection1.Connected := True;
end;

end.
