FireDAC.Comp.DataSet.TFDDataSet.Disconnect

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
Unit: FireDAC.Comp.DataSet
Parent: TFDDataSet

Delphi

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

C++

virtual void __fastcall Disconnect(bool AAbortJob = false);

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