Difference between revisions of "RPC HELP TRPCBroker RPCTimeLimit Example"

From VistApedia
Jump to: navigation, search
(Created page with "<h2>RPCTimeLimit Example</h2> The following program code demonstrates using the RPCTimeLimit property: '''procedure''' TForm1.Button1Click(Sender: TObject); '''var'''...")
(No difference)

Revision as of 19:38, 9 July 2015

RPCTimeLimit Example

The following program code demonstrates using the RPCTimeLimit property:

   procedure TForm1.Button1Click(Sender: TObject);
   var
     intSaveRPCTimeLimit: integer;
   begin
     brkrRPCBroker1.RemoteProcedure := 'GET ALL LAB RESULTS';
     brkrRPCBroker1.Param[0].Value := 'DFN';
     brkrRPCBroker1.Param[0].PType := reference;
     {save off current time limit}
     intSaveRPCTimeLimit := brkrRPCBroker1.RPCTimeLimit;
     {can take up to a minute to complete}
     brkrRPCBroker1.RPCTimeLimit := 60;
     brkrRPCBroker1.Call;
     {restore previous time limit}
     brkrRPCBroker1.RPCTimeLimit := intSaveRPCTimeLimit;
   end;