In a console app I have a connection string like this:
Data Source=localhost;Initial Catalog=database_name;Integrated Security=True;Connect Timeout=100
I've read here that I need to add Connect Timeout to the connection string to set the timeout, but if I run a query that contains
WAITFOR DELAY '00:00:40';
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)?