LiteDAC

TLiteConnection.Pooling Property

Enables or disables using connection pool.

Class

TLiteConnection

Syntax

property Pooling: boolean;

Remarks

Normally, when TLiteConnection establishes connection with the database it takes server memory and time resources for allocating new database 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. TLiteConnection 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, TLiteConnection.Database, TLiteConnection.ClientLibrary, TLiteConnection.EncryptionKey, TLiteConnectionOptions.ASCIIDatabase, TLiteConnectionOptions.DateFormat, TLiteConnectionOptions.TimeFormat, TLiteConnectionOptions.EnableSharedCache, TLiteConnectionOptions.BusyTimeout, TLiteConnectionOptions.ReadUncommitted, TLiteConnectionOptions.DefaultCollations, TLiteConnectionOptions.ForeignKeys, TLiteConnectionOptions.UseUnicode. 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