FireDAC.Comp.Client.TFDCustomCommand.AcquireConnection

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomCommand

Delphi

function AcquireConnection: TFDCustomConnection;

C++

TFDCustomConnection* __fastcall AcquireConnection();

Description

Acquires the reference to the actual connection object.

The AcquireConnection method acquires the reference to the connection object, depending on the values of the Connection or ConnectionName properties and increments its usage count.

After usage, the connection object must be released by calling the ReleaseConnection method. The command object is automatically connected when calling Prepare. The connection is terminated when Unprepare is called.

See Also