ADO.NET

ADO.NET Projects

ADO.NET Project 1

ADO.NET Examples

Examples

ConnectionPooling
Previous Home Next

A connection pool is a set of database connections .Connection pool are available for an application to use and it is using for enhanced performance.

Connection pooling is also usefull for sharing resources. Connection pooling is used to handle the performance of executing commands on a database and it needs a connection to that database to be established before executing a command , .Connection pooling is used with applications that do not have a state. State is a presence between instances. ASP pages are consider stateless because they do not share data between themselves. Stateless applications benefit from connection pooling because they can not hold a connection open by themselves.Connection pooling is also usefull for sharing resources.

ConnectionPooling parameter

These are four parameters that control most of the connection pooling behavior

    Max Pool Size: The maximum size of our connection pool. Default is 100.

    Min Pool Size: Initial number of connections which will be added to the pool upon its creation. Default is 0.

    Connect: Timeout Controls the wait period in seconds when a new connection is requested, if this timeout expires, an exception will be thrown. Default is 15 seconds.

    Pooling: Controls if your connection pooling on or off. Default as you may've guessed is true. Read on to see when we may use Pooling=false setting.

 

Using ADO within Active Server Pages

To use connection pooling with ASP, we can use ADO objects as our database interface and have connection pooling turned on for IIS 3.0.

Code For Connection pooling

"initial catalog=emp; Min Pool Size=20;Max Pool Size=500;
           data source=localhost;Connection Timeout=30; 
                              Integrated security=sspi"
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback:
>