View source: R/check_odbc_channel.R
check_odbc_channel | R Documentation |
Check if an object is an open ODBC-channel.
check_odbc_channel(x, dbservice = NULL, dbinterface = "odbc")
assert_odbc_channel(
x,
dbservice = NULL,
dbinterface = "odbc",
.var.name = checkmate::vname(x),
comment = NULL,
add = NULL
)
x |
[ |
dbservice |
[character(1)] |
dbinterface |
[character(1)] |
.var.name |
[ |
comment |
[ |
add |
[ |
The check uses RODBC:::odbcValidChannel
to check
if the argument is an open ODBC-channel. Be aware that this
function is an internal RODBC
-function and may change
within that package without warning.
Depending on the function prefix:
If the check is successful, the function
assert_odbc_channel
return x
invisibly, whereas
check_odbc_channel
return TRUE
.
If the check is not successful,
assert_odbc_channel
throws an error message and
check_odbc_channel
returns a string with the error message.
Petter Hopp Petter.Hopp@vetinst.no
## Not run:
# login to PJS
journal_rapp <- login("PJS")
# error check:
check_odbc_channel(x = "journal_rapp", dbservice = "PJS")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.