FireDAC.Comp.DataSet.TFDDataSet.Disconnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Disconnect(AAbortJob: Boolean = False); virtual;

C++

virtual void __fastcall Disconnect(bool AAbortJob = false);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet

Description

Releases DBMS resources used by this dataset.

Use the Disconnect method to optionally abort current operations and release DBMS resources used by this dataset. After the call, the dataset is in dsInactive state and descendants have the Prepared property set to False.

Example

FDQuery1.SQL.Text := 'select * from [Order Details]';
FDQuery1.Prepare := True;
FDQuery1.Active := True;
FDQuery1.Disconnect;
// Active = False and Prepare = False

See Also