On Fri, 2013-09-06 at 16:11 +0200, Benoît Minisini wrote: > Le 06/09/2013 16:01, Alexie a écrit : > > Version 3.4.2 is used, and after reconnecting, the request will be retried > > too? Currently i see an error thrown. > > > > This is a mysql client option. > > When connecting to a mysql database, the Gambas mysql driver define the > MYSQL_OPT_RECONNECT option, that tells the mysql client to automatically > reconnect to the server if the connection is lost. > > So normally you should not have the "connection lost" error message. > > If, apparently, the mysql client does not respect its own options, you > will have to handle that yourself. > > What I suggest is explicitly closing and reopening the connection from > time to time (for example each hour). I did that for my own application > because I got some errors too (but not the "connection lost" error, > something else) and I don't have problems anymore. > > If you tell me that this solution works, maybe I will integrate it > directly into the database driver.
Hi Benoît, If you would integrate this into the database driver, then could this be made: 1. Optional (so you can enable or disable the closing and reopening of the connection) 2. With a configurable time interval that defaults to an hour for example, but can be set to other intervals as well. -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user