Connection Pooling via connection string.--
ConnectiOnLifeTime - time in seconds AFter which the connection will be destroyed.
MaxPoolSize - Max connection in pool
MinPoolSize - Minimum number of inactive of connection will remain in pool.
Pooling=True
Samples connection string is :
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data source=DataServer;" +
"Integrated Security=true;Initial Catalog=Sales;" +
"Pooling=true; Max Pool Size=200; Min Pool Size=1;"+
"Connection Lifetime=0";
con.Open();
No comments:
Post a Comment