gpt4 book ai didi

c# - SQL(本地)不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 18:16:02 24 4
gpt4 key购买 nike

我在全新安装 SQL Server 时遇到问题。

连接字符串:

Data Source=(local);Initial Catalog=SGGW.USS;Integrated Security=SSPI;Pooling=false

但这行得通

Data Source=.\EOGSQL;Initial Catalog=SGGW.USS;Integrated Security=SSPI;Pooling=false

EOGSQL 是我的本地机器,只运行 SqlServer 数据库

心电图

最佳答案

(local) 实际上是一个关键字,而不是对本地机器的特定引用(尽管有时它的使用方式似乎是这样)。以下是有关其真正含义的更多信息:

http://blogs.msdn.com/b/sql_protocols/archive/2008/09/19/understanding-data-source-local-in-sql-server-connection-strings.aspx

在您的情况下,问题是 (local) 指的是机器和默认实例,而 .\EOGSQL 指的是本地机器上的实例(本地机器由句点指定)。基本上,这是按预期工作的。

关于c# - SQL(本地)不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6331787/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com