afsc-assessments / afscdata

An R package for data extraction of AFSC survey and fishery data
https://afsc-assessments.github.io/afscdata/
Other
2 stars 0 forks source link

User error with connect() #12

Closed JaneSullivan-NOAA closed 1 year ago

JaneSullivan-NOAA commented 1 year ago

When I run

akfin <- connect(db = "akfin")

I get the following error:

Error: nanodbc/nanodbc.cpp:1118: IM002: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

When I change the connect() source code from:

    DBI::dbConnect ( odbc::odbc(),
                     driver = db,
                     uid = user,
                     pwd = pwd )

to

    DBI::dbConnect ( odbc::odbc(),
                     db,
                     uid = user,
                     pwd = pwd )

the error goes away, and I'm able to connect to the database without issues.

Is this machine specific? If so is there a set up test we can run within the function to help users troubleshoot this issue?

BenWilliams-NOAA commented 1 year ago

i ran into the same issue today (thinking something updated). same result here so i removed the driver = and works fine now.