Hi fellows, I use RMySQL. I want to reconnect, if the connections is not alive anymore.
if (!connected()) con<-dbConnect(MySQL(),user=.., password=..,host=..,db=..) But how can I do the test connected()? I thought the way to do this was, connected()<-function(){return (exists("con") & isIdCurrent(con))} But that does'n work, after some time connected() returns TRUE, but the next dbGetQuery signals Error in mysqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not run statement: MySQL server has gone away) How can I test if the connection is still valid? Thanks Frans ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.