You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Connecting by explicitly providing the SQL connection string to ODBC libraries/packages
202
202
203
-
Inbo staff can consult a list of connection strings [here](https://docs.google.com/spreadsheets/d/1Wu7GmWm-NyHLHYWwuu74aQuugkDKGnLF-8XFFPz_F_M/edit?usp=sharing)
203
+
INBO staff can consult a list of connection strings [here](https://docs.google.com/spreadsheets/d/1Wu7GmWm-NyHLHYWwuu74aQuugkDKGnLF-8XFFPz_F_M/edit?usp=sharing).
204
204
At this moment, you can actually connect using typical ODBC libraries/packages provided by R or Python:
205
205
206
-
```{r eval = FALSE}
206
+
```r
207
207
library(DBI)
208
208
connection<- dbConnect(
209
209
odbc::odbc(),
210
-
.connection_string = "Driver={ODBC Driver 13 for SQL Server};Server=DBServername;Database=DBName;Trusted_Connection=yes;"
210
+
.connection_string="Driver={ODBC Driver 17 for SQL Server};Server=DBServername;Database=DBName;Trusted_Connection=yes;"
211
211
)
212
212
dbListTables(connection)
213
213
```
214
214
215
215
```python
216
216
import pyodbc
217
-
conn = pyodbc.connect("Driver={ODBC Driver 13 for SQL Server};Server=DBServername;Database=DBName;Trusted_Connection=yes;")
217
+
conn = pyodbc.connect("Driver={ODBC Driver 17 for SQL Server};Server=DBServername;Database=DBName;Trusted_Connection=yes;")
218
218
```
219
219
220
220
In RStudio, you can also make the connection with the GUI:
@@ -236,7 +236,7 @@ However, it is probably easier to provide the configuration to specific database
0 commit comments