View source: R/open-dsn-channel.R
open_dsn_channel_sqls_odbc | R Documentation |
Creates & opens a channel and checks its important characteristics.
open_dsn_channel_sqls_odbc(
dsn_name,
driver_version_minimum = numeric_version("17.0"),
driver_version_maximum = numeric_version("99.0")
)
dsn_name |
Name of the locally-defined DSN passed to |
driver_version_minimum |
The driver must be at least this version number. Represented as a |
driver_version_maximum |
The driver must not exceed this version number. Represented as a |
A DSN channel requires more code than usual to diagnose problems, because the DSN
is defined on the local computer, and is not under the control of the repository.
This function wraps the basic DBI::dbConnect(odbc::odbc(), dsn = dsn_name)
function with some
checks. If unsuccessful, it returns some hints how to correct the problem, such as downloading
the newest version from the Microsoft website.
OuhscMunge::open_dsn_channel_sqls()
was deprecated and was removed 2020-10-18. Please use 'OuhscMunge::open_dsn_channel_sqls_odbc().
Assuring a minimum version is important, because driver versions can interpret values differently. For example, earlier version (before 11.0) returned dates as characters, which would propagate undetected through our code until it broke something with an unhelpful error message.
## Not run:
requireNamespace("OuhscMunge")
OuhscMunge::open_dsn_channel_sqls_odbc(
dsn_name = "miechv_eval"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.