FireDAC.Comp.Client.TFDCustomConnection.ReleaseClients

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ReleaseClients(AMode: TFDReleaseClientMode = rmDisconnect);

C++

void __fastcall ReleaseClients(TFDReleaseClientMode AMode = (TFDReleaseClientMode)(0x3));

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDCustomConnection

Description

Performs a resource releasing operation on all associated datasets and commands.

Use the ReleaseClients method to perform one of more DBMS resources releasing operation on all datasets and commands associated with this connection object. An operation is defined by AMode:

Mode 

Description 

rmFetchAll 

Performs FetchAll if the dataset is active and not all records are fetched. If the dataset is unidirectional, then it is closed. All active commands are closed. 

rmClose 

Close all datasets and commands. 

rmOffline 

Bring all datasets to offline mode, when all records are fetched. All commands are closed and unprepared. 

rmDisconnect 

All datasets and commands are closed and unprepared. 

Example

// Fetch all records from the active cursors, then commit the current transaction.
// On MS SQL Server, for example, active cursors are invalidated after the finishing of a transaction.
FDConnection1.ReleaseClients(rmFetchAll);
FDConnection1.Commit;

See Also