ProcParams

<< Click to Display Table of Contents >>

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

ProcParams

Declaration

ProcParams: TParams

Description

The parameters to be passed into and received back from the Server DLL's procedure.

 

DataType indicates the type of parameter being sent or returned (String, Boolean Integer, etc). Name is the name of the parameter.

 

ParamType is the type of parameter (Input – being sent to the server, Output – coming back from the server as a result, etc).

 

Value will hold the parameter value as it is sent or received.

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'; 

                   // Always set ProcName first

         ProcName := 'SalaryUpdate';  

 

         // Check if server has all parameters needed. 

         // Ignore (do not create) if already exists 

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

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

 

                   // Return Value

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

                 ProcParams.CreateParam(ftInteger, 'Count', ptOutput);

 

         // Increase salary for Californians 

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

         ExecProc; 

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

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

 end; 

end;

See Also

ExecProcExecProc, ActiveTApolloServerDLL_Active , ProcNameProcName