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

Description Usage Arguments Value Examples

Description

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

Usage

1
2
## S4 method for signature 'DatabaseConnectorDriver'
dbConnect(drv, ...)

Arguments

drv

The result of the link{DatabaseConnectorDriver} function

...

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
conn <- dbConnect(DatabaseConnectorDriver(),
  dbms = "postgresql",
  server = "localhost/ohdsi",
  user = "joe",
  password = "secret"
)
querySql(conn, "SELECT * FROM cdm_synpuf.person;")
dbDisconnect(conn)

## End(Not run)

DatabaseConnector documentation built on Nov. 18, 2021, 5:08 p.m.