validate_RODBC_input: Validating requests for an RODBC connection.

Description Usage Arguments Value

View source: R/validate_RODBC_input.R

Description

This is a helper function used to insure users provide valid input where they need to specify a valid RODBC connection.

Here 'valid' means either an object of class RODBC or a character string that - when passed to RODBC::odbcConnect() - creates such an RODBC object.

Usage

1

Arguments

connection

An RODBC connection or character vector that can be passed to odbcConnect to create an RODBC connection.

Value

The function returns a list with three elements.

x$test_result will return boolean TRUE if an RODBC object is provided or was successfully created - it will be FALSE otherwise.

x$test_message returns a character string giving a more verbose description of the success or fail. It can be inspected for details or used to convey success/failure information to the user.

x$connection returns the created/validated connection. This is how the connection can be retrieved for further use.


pocdata/pocr documentation built on Jan. 5, 2022, 9:54 a.m.