dbIsValid(RSQLite::SQLite())
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbIsValid(con)
rs <- dbSendQuery(con, "SELECT 1")
dbIsValid(rs)
dbClearResult(rs)
dbIsValid(rs)
dbDisconnect(con)
dbIsValid(con)
Run the code above in your browser using DataLab