Skip to contents

Check database connection

Usage

aact_check_connection(con)

Arguments

con

Database connection object

Value

A data frame with distinct study types

Examples

# \donttest{
# Set environment variables for database credentials in .Renviron and load it
# readRenviron(".Renviron")

# Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
#> Error in postgresqlNewConnection(drv, ...): RPosgreSQL error: could not connect runner@aact-db.ctti-clinicaltrials.org:5432 on dbname "aact": connection to server at "aact-db.ctti-clinicaltrials.org" (174.138.61.222), port 5432 failed: fe_sendauth: no password supplied

# Check the connection
aact_check_connection(con)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'conn' in selecting a method for function 'dbGetQuery': object 'con' not found
# }