A few days ago the time-out problem bothered me a headache.
Why did I set the link string timeout for a long time, but wait a little while the error timeout?
connectionstring= "Data source=.;i Nitial catalog=content_extraction;persist security Info=true;user id=sa;password=868686; Multipleactiveresultsets=true; Connect timeout=1200; "
Is there a problem with the link string?
Search n More information, has not been resolved, gave up. Later put to the server run, the server memory is limited, time-out error causes can not run, search Baidu again, get the original time-out divided into various, SqlConnection has a timeout option,
SqlDataAdapter also has a timeout option, immediately understood, set as follows:
SqlConnection: The timeout set on the link string is the unit of seconds;
SqlDataAdapter:sqlDataAdapter.SelectCommand.CommandTimeout = 120;//is 120s.
Because I'm populating the dataset, using SqlDataAdapter, which is set to timeout separately, the timeout for the connection string is not effective. SoGa
Finally fix, this question is not big problem, but pit me many days, ask a lot of people hopeless, hereby post.
About the ADO timeout problem