Failure to connect to odbc database in R

前端 未结 6 515
难免孤独
难免孤独 2020-12-02 00:00

I\'ve been trying to connect my company\'s DMS to R using the odbcConnect command, but get the following message:

myConn <-odbcConnect(\"NZSQ         


        
6条回答
  •  温柔的废话
    2020-12-02 00:09

    I just spent days on this. If you are using a Microsoft Access database you have to use the full path to the database, it won't even find the file in the same folder. So from the above question,

    myConn <-odbcConnect("NZSQL", uid="cejacobson", pwd="password")

    Would need to be something like

    myConn <-odbcConnect("c:\\NZSQL", uid="cejacobson", pwd="password")

    Phil's link really helped: https://www.connectionstrings.com/

提交回复
热议问题