Created
November 15, 2017 02:33
-
-
Save daattali/49e808affe7496fa8a04434e79b86453 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connecting using RPostgreSQL works | |
library(RPostgreSQL) | |
con <- dbConnect(dbDriver("PostgreSQL"), | |
host = "localhost", | |
dbname = "postgres", | |
user = "postgres", | |
password = password, | |
port = 5432) | |
# Connecting with odbc not working (probably wrong parameters) | |
con <- DBI::dbConnect(odbc::odbc(), | |
Driver = "PostgreSQL Driver", | |
Server = "localhost", | |
Database = "postgres", | |
UID = 'postgres', | |
PWD = password, | |
Port = 5432) | |
# Error: nanodbc/nanodbc.cpp:950: IM002: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment