Hi, i got a bug on a C# application, the problem is that i have a static class to manage all transactions with a database, and the application should try for itself to connect to defined SQL Server IP's. Everything is fine except that when i try to connect to any of the IP's the timeout specified in the Connection string is ignored, instead takes the default value (30 secs) and this is a pain. If the app can“t connect to any of the specified IPs then ask the user for the IP and makes another attempt to connect, this time using an overloaded function that takes the IP addr as parameter, and the weird is that in this attempt the Timeout works as specified in the connection string. Anyone has an idea about how to solve this?
	ConnectionStrin  g Used:
	Thanks in advance
							
						
					Code:
	foreach (string IP in SQL_IPs)
            {
                string ConnectionString = CSPart1 + IP + CSPart2;
                try
                {
                    SQLCon = new SqlConnection(ConnectionString);
                    
                    SQLCon.Open();
                    if (SQLCon.State == ConnectionState.Open)
                    {
                        BuildArrays();
                        return true;
                    }
                }
                catch (SqlException sqlex)
                {
                    Console.WriteLine("===========================================");
                    Console.WriteLine(sqlex.Message);
                    Console.WriteLine(sqlex.StackTrace);
                    Console.WriteLine(sqlex.Source);
                    Console.WriteLine("===========================================");
                    continue;
                }
            }
            return false;
Code:
	Initial Catalog=DB1; Data Source=172.16.1.5;User ID=admin; Password=admin; Connection Timeout=3
Comment