MaxPoolSize : SqlCommandBuilder « Database ADO.net « C# / C Sharp






MaxPoolSize

 
using System;
using System.Data.SqlClient;

class MainClass {
    public static void Main(string[] args) {
        string conString = @"Data Source=.\sqlexpress;" +
            "Database=Northwind;Integrated Security=SSPI;" +
            "Min Pool Size=5;Max Pool Size=15;Connection Reset=True;" +
            "Connection Lifetime=600;";

        SqlConnectionStringBuilder sb1 = new SqlConnectionStringBuilder(conString);
        Console.WriteLine("  Max Pool Size = " + sb1.MaxPoolSize);

        SqlConnectionStringBuilder sb2 = new SqlConnectionStringBuilder(conString);

        sb2.MaxPoolSize = 15;

        Console.WriteLine("  " + sb2.ConnectionString);

    }
}

 








Related examples in the same category

1.new SqlConnectionStringBuilder(conString)
2.InitialCatalog
3.IntegratedSecurity
4.MinPoolSize
5.LoadBalanceTimeout
6.ConnectionReset
7.Generate SQL command automatically from SqlCommandBuilder and SqlDataAdapter