RODBC odbcDriverConnect() Connection Error

前端 未结 4 1603
长发绾君心
长发绾君心 2020-11-27 17:09

I\'m trying to use

odbcDriverConnect(\'driver={SQL Server};server=servername\\instancename,port;database=testing;username=abc;password=123456\') 

4条回答
  •  渐次进展
    2020-11-27 17:33

    Looks like you are trying to connect to the SQL Server. This code snippet should work, it worked for me:

    library("RODBC")

    connection <- DBI::dbConnect(odbc::odbc(), Driver = "SQL Server", Server = "Your Server Name", Database = "Your Database Name", UID = "Your Database Name", UID = "Your Server Login", PWD = "Your Server Password", Port = 1433)

    Reference: Connecting MS SQL Server via R

提交回复
热议问题