create_connection: Create connection to database

View source: R/connections.R

create_connectionR Documentation

Create connection to database

Description

Create connection to database

Usage

create_connection(.database_name, .server_name, env = globalenv())

Arguments

.database_name

name of the database you want to connect to

.server_name

the name of the server the database is hosted on

env

which environment to save the connection. The default is the global environment and you should not change this unless you really need to and you know what you are doing.

Value

returns an S4 object that inherits from DBIConnection. This object is used to communicate with the database engine.

Note that this function is called for it's side-effect: it will create a connection object with the name conn_{.database_name} so that other functions and users have access to the connection.

Examples

## Not run: create_connection("PROD1")

idea-analytics/ideadata documentation built on Feb. 1, 2024, 5:40 a.m.