RPC HELP TRPCBroker RPCTimeLimit Example

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

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;