Auto reconnect to MySql when connection is lost after period of inactivity
-
Hi, I have a c# application that uses a MySql database, the problem that after a period of inactivity (8 hours) or when connection to the server where database is host is lost, the connection to the database is closed and database queries cannot be executed. how can i enable the auto reconnect to the database. Best regards.
Keep it simple, stupid!
-
Hi, I have a c# application that uses a MySql database, the problem that after a period of inactivity (8 hours) or when connection to the server where database is host is lost, the connection to the database is closed and database queries cannot be executed. how can i enable the auto reconnect to the database. Best regards.
Keep it simple, stupid!
-
Hi, I have a c# application that uses a MySql database, the problem that after a period of inactivity (8 hours) or when connection to the server where database is host is lost, the connection to the database is closed and database queries cannot be executed. how can i enable the auto reconnect to the database. Best regards.
Keep it simple, stupid!
why are you making your connection always active means you dont need to connect to db always, you should connect to the db when you need to connect at the time of doing any CRUD operations,it will resolve your inactivity problem. CCreate R Retrieve UUpdate DDelete
Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
-
Through a Timer in your C# code. :~
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
-
Shouldnot disconnected architecture will resolve it :doh:
Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
I was also thinking why would you need an active connection "forever". Then thought there might be something in his application that desperately needs it and hence the reply.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
-
I was also thinking why would you need an active connection "forever". Then thought there might be something in his application that desperately needs it and hence the reply.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD