title: sql: set connection timeout in the connection string
body: <p>In a console app I have a connection string like this:</p>
  
  <pre><code>Data Source=localhost;Initial Catalog=database_name;Integrated Security=True;Connect Timeout=100
  </code></pre>
  
  <p>I've read <a href="https://www.connectionstrings.com/all-sql-server-connection-string-keywords/" rel="nofollow noreferrer">here</a> that I need to add <strong><code>Connect Timeout</code></strong>  to the connection string to set the timeout, but if I run a query that contains </p>
  
  <pre><code>WAITFOR DELAY '00:00:40';
  </code></pre>
  
  <p>I'll get a timeout exception, so it seems that the timeoput from the connection string is ignored. so how to set the timeout in the connection string (and not on the connection or command objects)?</p>