ComponentOne True DataControl 8.0
Connection Pooling

True DataControl set up at design time must use a connection to the database (ADO Connection object) creating its SourceRecordset. If every TData control would create its own separate connection object, that would engender serious performance problems, since establishing a connection is a performance-heavy operation for most databases.

True DataControl uses a pooling technique to minimize the number of simultaneously open connections. When a TData control creates its SourceRecordset, it first checks if a connection with exactly the same properties exists in the pool, was created by another TData control that is still active. If there is such connection, TData uses it instead of creating a new one.

In order for two TData controls to use a single connection, they must be

If you want to pool TData connections in more complex cases, for example, between different forms open at different times, or between different invocations of a form, use the SourceConnection property.

To check the current status of the connection pool, use PooledConnectionCount and PooledConnections properties. These properties allow the developer to examine connections currently in the pool. They are useful when you are in doubt, perhaps not sure if all the connection-related properties have the same values, and want to see what is actually happening. Do not use these two properties for any other purposes than to make sure the connection pool works as intended.

Note: Connection pooling is unavailable in True DataControl Lite.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback