adspace
What are the rules to implement connection pooling?
Answer Posted / Kushal Sharda
The rules to implement connection pooling in ADO.NET are:
1. Connection Pooling must be enabled by setting the ConnectionString property of a connection object.
2. The minimum and maximum number of connections that can be maintained by the pool should be defined using the MinPoolSize and MaxPoolSize properties respectively.
3. The time-out value for idle connections can be set using the Connect Timeout property.
4. It's essential to release connections back to the pool after use using the Close() method.
5. To avoid connection exhaustion, it's advisable to open and close connections only when necessary.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers