@ -15,10 +15,13 @@ 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))