MyDAC

TCustomDAConnection.Pooling Property

Enables or disables using connection pool.

Class

TCustomDAConnection

Syntax

property Pooling: boolean default DefValPooling;

Remarks

Normally, when TCustomDAConnection establishes connection with the server it takes server memory and time resources for allocating new server connection. For example, pooling can be very useful when using disconnect mode. If an application has wide user activity that forces many connect/disconnect operations, it may spend a lot of time on creating connection and sending requests to the server. TCustomDAConnection has software pool which stores open connections with identical parameters.

Connection pool uses separate thread that validates the pool every 30 seconds. Pool validation consists of checking each connection in the pool. If a connection is broken due to a network problem or another reason, it is deleted from the pool. The validation procedure removes also connections that are not used for a long time even if they are valid from the pool.

Set Pooling to True to enable pooling. Specify correct values for PoolingOptions. Two connections belong to the same pool if they have identical values for the parameters: MinPoolSize, MaxPoolSize, Validate, ConnectionLifeTime , Server, Username, Password, TCustomMyConnection.Database, TCustomMyConnection.IsolationLevel, TMyConnection.Port, TMyConnection.IOHandler, TCustomMyConnection.ConnectionTimeout, TMyConnectionOptions.Compress, TMyConnectionOptions.Direct, TMyConnectionOptions.Embedded, TMyConnectionOptions.Protocol, TCustomMyConnectionOptions.Charset, TCustomMyConnectionOptions.UseUnicode, TCustomMyConnectionOptions.NumericType.

Note: Using Pooling := True can cause errors with working with temporary tables.

See Also

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