<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloServerDLL > TApolloServerDLL Methods > ExecProc |
Declaration
procedure ExecProc;
Description
Executes the Server DLL procedure specified by the ProcName property. This has the same effect as setting the Active property to True.
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 to 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
.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
ActiveTApolloServerDLL_Active