Learn R Programming

DatabaseConnector (version 6.3.3)

dbConnect,DatabaseConnectorDriver-method: Create a connection to a DBMS

Description

Connect to a database. This function is synonymous with the connect() function. except a dummy driver needs to be specified

Usage

# S4 method for DatabaseConnectorDriver
dbConnect(drv, ...)

Value

Returns a DatabaseConnectorConnection object that can be used with most of the other functions in this package.

Arguments

drv

The result of the DatabaseConnectorDriver() function

...

Other parameters. These are the same as expected by the connect() function.

Examples

Run this code
if (FALSE) {
conn <- dbConnect(DatabaseConnectorDriver(),
  dbms = "postgresql",
  server = "localhost/ohdsi",
  user = "joe",
  password = "secret"
)
querySql(conn, "SELECT * FROM cdm_synpuf.person;")
dbDisconnect(conn)
}

Run the code above in your browser using DataLab