|
|
|
The Pune Entrepreneurs Network Network is not currently active and cannot accept new posts |
"Too many Connectionn" Error | Views: 521 |
Apr 19, 2008 11:37 am | | "Too many Connectionn" Error | # |
Rishi Boparai | | In One Of my .Net Application"Too many Connection" Pop-up message Error again and again in Connection open time. I am using .Net2008 and Mysql database.first time application open Correctly and After some time it's pop-up message.Please Anyone tell me proper solution.
ThanksPrivate Reply to Rishi Boparai |
May 06, 2008 5:31 pm | | re: "Too many Connectionn" Error | # |
Jitesh Patil | | Rishi,
First of all there is no .Net 2008. The latest version of .Net is 3.5. You probably mean you are using Visual Studio 2008.
Now to your issue, what are you using to connect to the mysql database? .Net System.Data DataAccess classes, linq, or an ORM like subsonic?
My guess is you are using System.Data DataAccess classes. Now ehen ever you are accesing database make sure you are doing the following.
try { 1. open DB connection here. 2. do your DB related stuff. } catch (Exception ex) { 1. Exception handling stuff here. } finally { 1. Close your connection here. }
The most important thing here is closing the connection in finally, if you were closing the connection in the try block and for some reason the statements above connection close threw an exception, your connection was never closed.
Let me know if you have any questions.Private Reply to Jitesh Patil |
|
|