Dear
Team Support!
Using Delphi Tokyo, Unidac 7.0.2 and SQLServer for the 3 Layer Environment (DataSnap).
How do I enable a connection pool?
When I use ADO this feature is already enabled by default on the database client.
Is it possible to use this feature with the Devart / Unidac components?
Is there any example or documentation?
I await a return and thank you for your attention.
Best Regards,
André Santos
Connection Pooling with Unidac and SQLServer
-
- Posts: 2
- Joined: Thu 15 Oct 2015 12:33
Re: Connection Pooling with Unidac and SQLServer
In order for UniDAC to use connection pooling, set TUniConnection.Pooling to True. When using pooling, and you call the TUniConnection.Close method, the connection won't be closed, but it will be placed to pool for a number of milliseconds specified in TUniConnection.PoolingOptions.ConnectionLifetime. After this time passes, the connection will be closed an removed from the pool if any other TMSConnection does not use it.
When opening a new connection, the pool will be checked first. If a connection is found with the same parameters in the pool, it will be returned from the pool. Otherwise, a new connection will be created.
More details about UniDAC Connection Pooling in our online documentation:
https://www.devart.com/unidac/docs/inde ... ooling.htm
When opening a new connection, the pool will be checked first. If a connection is found with the same parameters in the pool, it will be returned from the pool. Otherwise, a new connection will be created.
More details about UniDAC Connection Pooling in our online documentation:
https://www.devart.com/unidac/docs/inde ... ooling.htm