aca
❔ Connection Timeout argument passed doesn't work for a SqlConnection
I have the following connection string:
I have a WPF with a control calling a MessageBox to show whether the connection to the database is established or not and I want Connection.Open() to terminate early instead of the user having to wait 15 seconds for the failed connection message to be displayed, but Connection Timeout=2 seems to do nothing.
An open connection gives an instantaneous response, while the failed connection despite the argument, loads with the average time no matter what the timeout is set to.
This is the code for the sqlconnection call:
90 replies