Learn R Programming

DatabaseConnector (version 6.3.3)

disconnect: Disconnect from the server

Description

Close the connection to the server.

Usage

disconnect(connection)

Arguments

connection

The connection to the database server created using either connect() or DBI::dbConnect().

Examples

Run this code
if (FALSE) {
connectionDetails <- createConnectionDetails(
  dbms = "postgresql",
  server = "localhost",
  user = "root",
  password = "blah"
)
conn <- connect(connectionDetails)
count <- querySql(conn, "SELECT COUNT(*) FROM person")
disconnect(conn)
}

Run the code above in your browser using DataLab