I\'m trying to use
odbcDriverConnect(\'driver={SQL Server};server=servername\\instancename,port;database=testing;username=abc;password=123456\')
For the Microsoft ODBC Driver 11 for SQL Server on Linux with RODBC version 1.3-7 in R version 3.0.1 none of the above answers worked. What did work however was the following:
dbconnection <- odbcDriverConnect("Driver=ODBC Driver 11 for SQL Server;
Server=127.0.0.1; Database=MyDBName;
Uid=MyName; Pwd=XXXX")
(put in the relevant IP address, database name etc.).
In case of a trusted connection:
dbconnection <- odbcDriverConnect("Driver=ODBC Driver 11 for SQL Server;
Server=127.0.0.1; Database=MyDBName;
Uid=MyName; Pwd=XXXX; trusted_connection=yes")
trusted_connection
will only listen to "yes" or "no" and not to "true" and "false"