Datasnap.DSCommonServer.DSAdmin.ClearResources

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ClearResources: Boolean;

C++

bool __fastcall ClearResources();

Properties

Type Visibility Source Unit Parent
function public
Datasnap.DSCommonServer.pas
Datasnap.DSCommonServer.hpp
Datasnap.DSCommonServer DSAdmin

Description

Releases resources allocated for parameters of previous server methods.

The ClearResources method releases resources allocated for parameters of previous server methods. ClearResources returns True if all the allocated resources were freed, False otherwise. Even if the deallocation of a parameter fails, the deallocation of the other parameters does not stop.

The following Delphi example illustrates the use of ClearResources:



procedure TForm1.Button1Click(Sender: TObject);
begin
SQLServerMethod := TSQLServerMethod.Create(nil);
SQLServerMethod.SQLConnection := SQLConnection1;
SQLServerMethod.ServerMethodName := 'DSAdmin.ClearResources';

try
SQLServerMethod.ExecuteMethod;
Label1.Caption := SQLServerMethod.Params[0].AsString;
finally
SQLServerMethod.Close;
FreeAndNil(SQLServerMethod);
end;
end;



See Also