Le 06/09/2013 08:12, Alexie a écrit : > Hi, > > We are connection to a MySQL database (on the local machine) and the > application sometimes runs for days/weeks and numerous select, update, > delete, etc are going over the connection every hour (so it isn't lack of > traffic). > > We do things like: > > rResult = Main.hDB.Exec("UPDATE devices_alex SET value = &1 WHERE > nodeid = &2", sValue, sAddress) > > > After a while (not easy reproduceable) we get errors like: > 'Query failed: Lost connection to MySQL server during query' > > Is there an easy way of forcing MySQL to reconnect again and retry the > command? This without adding many-many-many lines of code at each SQL Exec > statement. > > Regards, > Alex
MySQL automatic reconnection is normally handled automatically by Gambas for a while. Which version do you use? -- Benoît Minisini ------------------------------------------------------------------------------ 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