RODBC MS SQL access from Ubuntu using FreeTDS

后端 未结 3 1066
情书的邮戳
情书的邮戳 2021-02-11 02:08

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 02:54

    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])
    

提交回复
热议问题