Generate a function to connect to a database
1 | connect_db(drv = odbc::odbc(), value = "datawarehouse", ...)
|
drv |
an object that inherits from DBIDriver, or an existing DBIConnection object (in order to clone an existing connection). |
value |
Name of value ( |
... |
add additional parameters to DBI::dbConnect, such as .connection_string = "Language=English;AutoTranslate=Yes;" when connecting to sql server |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.