使用R的ODBC连接

发布于 2025-01-17 18:47:32 字数 314 浏览 4 评论 0原文

以下是一段代码,不知何故它失败了。不确定原因。可能是什么原因?

dbhandle_dev = odbcDriverConnect('driver={ODBC Driver 17 for SQL Server};server="DevSQL01";database="risk";trusted_connection=true') 

错误信息如下。 [RODBC] 错误:状态 08001,代码 0,消息 [Microsoft][SQL Server 的 ODBC 驱动程序 17] 为连接字符串属性“trusted_connection”指定的值无效

Following is the piece of code and somehow it fails. Not sure of the reasons. What could be the reasons?

dbhandle_dev = odbcDriverConnect('driver={ODBC Driver 17 for SQL Server};server="DevSQL01";database="risk";trusted_connection=true') 

Error message is as follows.
[RODBC] ERROR: state 08001, code 0, message [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'trusted_connection'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等风来 2025-01-24 18:47:32

以下是解决问题所需的一个。

dbhandle_dev = odbcDriverConnect('driver={ODBC Driver 17 for SQL Server};server="DevSQL01";database="risk";trusted_connection=Yes') 

Following is the one needed to solve the issue.

dbhandle_dev = odbcDriverConnect('driver={ODBC Driver 17 for SQL Server};server="DevSQL01";database="risk";trusted_connection=Yes') 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文