FireDAC.Comp.Client.TFDCustomConnection.Offline

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Offline;

C++

void __fastcall Offline();

Properties

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

Description

Sets the connection to offline mode.

The Offline method disconnects the datasets associated with this connection from the DBMS, but does not close them. It then closes the connection to the DBMS by implicitly setting Connected to False

After the call, the dataset continues to work as an in-memory dataset and you can perform with the dataset any client operation that does not require a DBMS, such as browsing. When an application in offline mode tries to perform any operation that requires communication with the DBMS, the following happen:

To bring the connection and associated datasets to the online state, call the Online method. 

Calling the Offline method is the same as setting Offlined to True.

Example

FDConnection1.Offline;
lblState.Caption := '<not connected>';

See Also