1

I have a c# windows application which uses MySQL database when I work in LAN (Locally with DB Server) it works fine but when I access to database server through the internet the delay on query execution is to much.

4
  • So, is on C# 4 or C# 3 ? Commented Sep 7, 2011 at 13:44
  • Typically accessing over the internet is slower. Have you done any timing? Do you know if the database you are hitting over the internet is slower in your queries or if it's just the time to send data over the wire? What is the nature of your data - could you compress it, or maybe choose to get less data? Lots more information would be great. Commented Sep 7, 2011 at 13:49
  • Prescott I am using this kind of connection: public OdbcConnection getConnection() { OdbcConnection con = new OdbcConnection(); string ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};Server="+server+";Database=database;Uid="+username+";Pwd ="+password+";"; try { con.ConnectionString = ConnectionString; } catch (Exception ex) {} return con; } Delay in query execution is about 3 sec Commented Sep 7, 2011 at 14:23
  • @star: mabe it's only dns. did you try to connect to ip-address ? second question: did your query timeout ? btw. 3 seconds is not slow. Commented Dec 7, 2011 at 19:26

1 Answer 1

1

Maybe you should use a Web Service or WCF to Query ,than that Service which should be Locally with the DB Server ,should proceed with Token Query from the Internet and get the Select.After this procedure the service should Return to desired client the DataTable .

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

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.