RPC HELP TRPCBroker Results Example

From VistApedia
Revision as of 18:59, 4 July 2015 by Kdtop (talk | contribs) (Created page with "<h2>Results Example</h2> The following program code demonstrates using the Results property: '''procedure''' TForm1.btnSendClick(Sender: TObject); '''begin''' ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Results Example

The following program code demonstrates using the Results property:

   procedure TForm1.btnSendClick(Sender: TObject);
   begin
     {clears Results between calls}
     brkrRPCBroker1.ClearResults := True;
     
     {the following code returns a single value}
     brkrRPCBroker1.RemoteProcedure := 'SEND BACK SOME SINGLE VALUE';
     brkrRPCBroker1.Call;
     Label1.Caption := 'Value returned is: ' + brkrRPCBroker1.Results[0];
     
     {the following code returns several values}
     brkrRPCBroker1.RemoteProcedure := 'SEND BACK LIST OF VALUES';
     brkrRPCBroker1.Call;
     ListBox1.Items := RPCBroker.Results;
   end;