Active

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloServerDLL > TApolloServerDLL Properties >

Active

Declaration

Active: Boolean;

Description

Executes the procedure defined in the Server DLL specified by the ProcName property. This has the same effect as calling ExecProc.

Delphi Example

Here's a procedure on the client that will operate on a table already opened by the client, and give all employees in the specified state ("CA" in this case) a 10% raise in their salary.

 

procedure TForm1.SalaryUpdate;

var

 iCount: Integer; 

begin

 with ApolloServerDLL1 do 

 begin 

         DataBaseName := 'SampleData'; 

         ProcName := 'SalaryUpdate'; // Always set ProcName first

 

         // Check to see if server has a copy of all the parameters we need. 

         // Ignore (do not create) if already exists 

         if ProcParams.FindParam('STATE') = nil then 

                 ProcParams.CreateParam(ftString, 'State', ptInput); 

         if ProcParams.FindParam('COUNT') = nil then 

                 ProcParams.CreateParam(ftInteger, 'Count', ptOutput); // Return Value

 

         // Increase salary for Californians 

         ProcParams.ParamByName('STATE').AsString := 'CA'; 

         Active := True;

         iCount := ProcParams.ParamByName('COUNT').AsInteger; 

         ShowMessage( IntToStr( iCount ) + ' record(s) were updated'); 

 end; 

end;

See Also

ExecProc