dbDisconnect: Disconnect (close) a connection

Description Usage Arguments Value Specification See Also Examples

Description

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

\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbDisconnect")}

Usage

1

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(), but this cannot be tested automatically. A warning is issued immediately when calling dbDisconnect() on an already disconnected or invalid connection.

See Also

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

Examples

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

Example output



DBI documentation built on May 2, 2018, 5:04 p.m.