UniDAC

TCustomDAConnection.Pooled Method

Indicates whether the connection was obtained from the pool or a new one was created.

Class

TCustomDAConnection

Syntax

function Pooled: Boolean;

Return Value
function Pooled: Boolean;

Remarks

When connection pooling is enabled and there are open connections in the pool, a connection is taken from the pool, and the Pooled function returns True for that connection. If the pool is empty, a new connection is created, and the Pooled function returns False for this connection.

This may be useful in the AfterConnect event because if Pooled returns False, then this is a new connection, and it may need to be initialized by executing an additional SQL script. If Pooled returns True, the connection does not need to be re-initialized, which improves performance.

See Also

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