0

im trying to control MySQL tables using C#, though it takes my program 5 seconds to load on a 3MBPS internet, and sometimes it throws a timeout exception because my program is taking too long to connect...

follow up question, does the time for the connection to open the only thing that is hard up on loading, or does the queries have an effect?

1 Answer 1

2

You have two time out values. Your connection has it's own timeout. This is the period you allow your provider to try and connect to the database.

Secondly you have a Command Timeout, and this is the amount of time you allow your query to execute before a timeout exception is raised.

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

4 Comments

how do i optimize it so that it would not be too laggy when i access my database through C#?
This is completely dependent on your Internet connection. You can set the Connection Timeout to the number of seconds you are willing to have your users wait. But no setting is going to make it be less laggy.
ouch... my internet connection and my client's is 3MBPS, what timeout should i set it into?
Timeout specifies the upper limit. So setting it to a high value will not result in a laggy interface. But it can result in a stuck user interface. Its better that your data access be on a seperate thread with an indication on the GUI about the current stage your Data access algorithm is in.

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.