Tinwor Tinwor - 1 month ago 14
SQL Question

What is "Connect Timeout" in sql server connection string?

Hi guys I have the following connection string(get from a property of sql server):

Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\myUser\Desktop\adoBanche\Banche\bin\Debug\banche.mdf;Integrated Security=True;Connect Timeout=30


I don't understand what mean
Timeout=30
. Someone could explain what means?

Answer

That is the timeout to create the connection, NOT a timeout for commands executed over that connection.

See for instance http://www.connectionstrings.com/all-sql-server-connection-string-keywords/ (note that the property is "Connect Timeout" (or "Connection Timeout"), not just "Timeout")

Comments