This closes the connection, discards all pending work, and frees resources (e.g., memory, sockets).

dbDisconnect(conn, ...)

Arguments

conn

A DBIConnection object, as returned by dbConnect().

...

Other parameters passed on to methods.

Value

dbDisconnect() returns TRUE, invisibly.

Specification

A warning is issued on garbage collection when a connection has been released without calling dbDisconnect(). A warning is issued immediately when calling dbDisconnect() on an already disconnected or invalid connection.

See also

Other DBIConnection generics: DBIConnection-class, dbDataType, dbExecute, dbExistsTable, dbGetException, dbGetInfo, dbGetQuery, dbIsValid, dbListFields, dbListResults, dbListTables, dbReadTable, dbRemoveTable, dbSendQuery, dbSendStatement, dbWriteTable

Examples

con <- dbConnect(RSQLite::SQLite(), ":memory:") dbDisconnect(con)