server.insert: server.insert

View source: R/configuration_server.R

server.insertR Documentation

server.insert

Description

insert a new server description

Usage

server.insert(dMeasure_obj, description)

Arguments

dMeasure_obj

dMeasure R6 object

description

list object : $Name, $Driver, $Address, $Database, $UserID, $dbPassword

'Driver' will be the MSSQL driver to use. If left blank or not defined, then 'SQL Server' will be used. Other possible choices include "ODBC Driver 11 for SQL Server" or "ODBC Driver 13 for SQL Server". A list of available drivers can be seen (in R) with odbc::odbcListDrivers()

'Address' will typically be of the form COMPUTERNAME and BPSINSTANCE, with two backslashes in between.

'Address' will require 'two' backslashes in the address, because the backslash needs to be 'escaped' with a preceding backslash (see examples).

'Database' will typically be BPSPATIENTS. the samples database will be BPSSAMPLES

'UserID' will always be 'bpsrawdata'

dbPassword will be immediately encrypted

Value

dataframe - full list of database descriptions can also return error (stop) if description is invalid

Examples

## Not run: 
a <- dMeasure::dMeasure$new()
a$open_configuration_db()
a$read_configuration_db()
a$server.insert(list(
  Name = "MyServer", Address = "127.0.0.1\\BPSINSTANCE",
  Database = "BPSSAMPLES", UserID = "bpsrawdata",
  dbPassword = "mypassword"
))

## End(Not run)

DavidPatShuiFong/dMeasure documentation built on Aug. 2, 2024, 11:45 p.m.