FireDAC.Comp.Client.TFDCustomConnection.RefCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property RefCount: Integer read FRefCount;

C++

__property int RefCount = {read=FRefCount, nodefault};

Properties

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

Description

Returns the number of references to this connection object.

Read the RefCount property to see how many command, dataset, and transaction objects reference this connection object. The property's value may not be the exact count of objects, because some objects can reference the same connection object multiple times. 

When no more objects reference this connection object, RefCount is equal to 0.

Example

if FDConnection1.RefCount = 0 then
  FDConnection1.Close;

See Also