【发布时间】:2016-10-12 21:15:45
【问题描述】:
我的连接字符串有问题,我似乎无法弄清楚。
这是我的代码——
datalithicdb <- odbcDriverConnect(connection="Driver={SQL Server};localhost/sqlexpress;database=datalithic;trusted_connection=TRUE;")
——以及我收到的错误信息——
Warning messages:
1: In odbcDriverConnect(connection = "Driver={SQL Server};localhost/sqlexpress;
database=datalithic;trusted_connection=yes;"):
[RODBC] ERROR: state 08001, code 0, message [Microsoft][ODBC SQL
Server Driver]Neither DSN nor SERVER keyword supplied
2: In odbcDriverConnect(connection = "Driver={SQL Server};localhost/sqlexpress;
database=datalithic;trusted_connection=yes;"):
[RODBC] ERROR: state 01S00, code 0, message [Microsoft][ODBC SQL
Server Driver]Invalid connection string attribute
3: In odbcDriverConnect(connection = "Driver={SQL Server};localhost/sqlexpress;
database=datalithic;trusted_connection=yes;"):
ODBC connection failed
当我直接从 SQL Management Studio 打开数据库时,Windows 身份验证工作正常。
Web 开发新手,非常感谢任何帮助。
【问题讨论】:
-
从
trusted_connection=yes更改为trusted_connection=TRUE -
改了,还是出现同样的错误
-
还是没有答案,来R社区吧……