RODBC MS SQL access from Ubuntu using FreeTDS

后端 未结 3 1739
旧时难觅i
旧时难觅i 2021-02-11 02:12

I\'m trying to access MS SQL server hosted on my Windows box from an Ubuntu machine. I have a shiny app that access MSSQL that works fine on Windows. I want to host this with sh

3条回答
  •  伪装坚强ぢ
    2021-02-11 03:11

    I had a similar error and realized R was just unable to read my user id correctly as it had a slash in it. I placed my credentials in a text file which solved the problem for me.

    cred <- "/myPath/ODBC_cred.txt"
    
    sql <- RODBC::odbcConnect("abc.xyz.com", uid=readLines(cred)[1], pwd=readLines(cred)[2])
    

提交回复
热议问题