Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
how to set the connection time out in the connection string?
September 28, 2010
give me a sample connection string where connection timeout is used.
what is the default value for defualt connection time out?
Posted Date: September 28, 2010 Points: 5
You can use the connection string to specify timeout in seconds.
SqlConnection connection = new SqlConnection(@"Data Source=localhost\sqlexpress; Initial Catalog=master; Integrated Security=true; Connect Timeout=2");
// Check the ConnectionTimeout property to ensure 2 seconds was set
int timeout = connection.ConnectionTimeout; // This is a getter only property
To post reply
Related Questions Related Questions
connection string for MySQL in asp.net
SQL 2000 Connection string problem on hosting server
dynamic sql connection string in web config file
Connection string in app.config?
Pass connection string from one package to another in SSIS
How to change the connection string for testing purpose?
How to resolve connection string error..
Create new Database connection error
Latest Forum Questions From The Same Category
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
What''s the difference between an interface and abstract class?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend