About the ADO timeout problem

Source: Internet
Author: User
Tags server memory

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.