Skip to content

Commit fde1619

Browse files
authored
Merge pull request #351 from inbo/database_access
r_database_access: update argument of dbConnect()
2 parents 316e518 + a3556f5 commit fde1619

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

content/tutorials/r_database_access/index.Rmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ you can do so by providing the necessary parameters:
5858
```{r eval=FALSE}
5959
my_connection <- DBI::dbConnect(odbc::odbc(),
6060
driver = "ODBC Driver 17 for SQL Server",
61-
server = "inbo-sql07-prd.inbo.be", # or inbo-sql08-prd.inbo.be
61+
server = "<server hostname or IP>",
6262
port = 1433,
6363
database = "D0021_00_userFlora", # or your database of interest
6464
trusted_connection = "Yes")
6565
```
6666

67-
The most important parameters are `server` and `database`, the others should normally be kept as such (except for maybe `driver`). For the first one, remember that database names starting with `M`, `S` or `W` can be accessed using the `inbo-sql08-prd.inbo.be` server and others (mostly with `D`) use the `inbo-sql07-prd.inbo.be` server. The database name is the name of the database (if you can't remember the name, connect with a database you do know, e.g. _D0021_00_userFlora_ and you'll see an overview of the existing databases on that server after connecting.) The driver version depends on your computer and can be looked up using `odbc::odbcListDrivers()`.
67+
The most important parameters are `server` and `database`, the others should normally be kept as such (except for maybe `driver`).
68+
For `server`, keep in mind that there is more than one server: database names starting with `M`, `S` or `W` use another server than those starting with `D`.
69+
The database name is the name of the database (if you can't remember the name, connect with a database you do know, e.g. _D0021_00_userFlora_ and you'll see an overview of the existing databases on that server after connecting.) The driver version depends on your computer and can be looked up using `odbc::odbcListDrivers()`.
6870

6971
### Use existing MSAccess connection name
7072

content/tutorials/r_database_access/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ inbodb), you can do so by providing the necessary parameters:
7171
``` r
7272
my_connection <- DBI::dbConnect(odbc::odbc(),
7373
driver = "ODBC Driver 17 for SQL Server",
74-
server = "inbo-sql07-prd.inbo.be", # or inbo-sql08-prd.inbo.be
74+
server = "<server hostname or IP>",
7575
port = 1433,
7676
database = "D0021_00_userFlora", # or your database of interest
7777
trusted_connection = "Yes")
7878
```
7979

80-
The most important parameters are `server` and `database`, the others
81-
should normally be kept as such (except for maybe `driver`). For the
82-
first one, remember that database names starting with `M`, `S` or `W`
83-
can be accessed using the `inbo-sql08-prd.inbo.be` server and others
84-
(mostly with `D`) use the `inbo-sql07-prd.inbo.be` server. The database
80+
The most important parameters are `server` and `database`, the others should
81+
normally be kept as such (except for maybe `driver`).
82+
For `server`, keep in mind that there is more than one server: database names
83+
starting with `M`, `S` or `W` use another server than those starting with `D`.
84+
The database
8585
name is the name of the database (if you can’t remember the name,
8686
connect with a database you do know, e.g. *D0021\_00\_userFlora* and
8787
you’ll see an overview of the existing databases on that server after

0 commit comments

Comments
 (0)