UniDAC

TCustomDAConnection.Pooled Method

Indicates whether the connection was retrieved from the pool or newly created.

Class

TCustomDAConnection

Syntax

function Pooled: Boolean;

Return Value
True if a connection was retrieved from the pool.

Remarks

When connection pooling is enabled and connections are available in the pool, the method retrieves a connection from the pool and Pooled returns True. If the pool is empty, a new connection is created and Pooled returns False.

The method can be useful in the AfterConnect event. If Pooled returns False, the connection is new and may require initialization, such as running an additional SQL script. If Pooled returns True, the connection has already been initialized and does not need reinitialization, which improves performance.

See Also

© 1997-2025 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback