1

I have a WPF application that directly communicates with a MS SQL 2008 database.

In the connection string, I have explicitly set the connection time out to be "Connect Timeout=6000", which should give me ten minutes.

I see that my application gives me a timeout error in just a little more than a minute. How can I ensure that I am given 10 minutes to complete my query?

I don't know if there's something missing in my connection string setup or database call, or whether this should be configured from the MS SQL server.

3 Answers 3

1

I just checked similar questions here and there's something written about a CommandTimeout. Let me try that first. Thanks!

Sign up to request clarification or add additional context in comments.

Comments

0

There is a different timeout value for query. If you are using SqlCommand, you can set your timeout value using SqlCommand.CommandTimeout

Comments

0

Setting 'Connect Timeout' in your connection string only applies to the opening of your connection to the database. In your query method, you need to set the timeout on your DbCommand object to your connection's timeout.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.