diff --git a/MainApp/MainApp/AdoClient.cs b/MainApp/MainApp/AdoClient.cs index 9fa07d4..c05d239 100644 --- a/MainApp/MainApp/AdoClient.cs +++ b/MainApp/MainApp/AdoClient.cs @@ -14,11 +14,14 @@ namespace MainApp private string connString; private SqlConnection conn; - + + private const int MIN_POOL_SIZE = 20; + private const int MAX_POOL_SIZE = 100; + private const int TIMEOUT = 15; // sec public bool SetConnection(string server, string database, string uid, string password) { - connString = $"server={server}; database={database}; uid={uid}; pwd={password};"; + connString = $"server={server}; database={database}; uid={uid}; pwd={password}; min pool size = {MIN_POOL_SIZE}; max pool size = {MAX_POOL_SIZE}; connection timeout = {TIMEOUT};"; using (conn = new SqlConnection(connString)) {