为什么某些连接字符串Data Source = address; Initial Catalog = dbname;....
而其他字符串为Server=address;database=dbname;...
?使用“数据源”和“服务器”有什么区别?
答案 0 :(得分:0)
请参阅以下链接,希望您能轻松回答您的问题。
https://www.connectionstrings.com/sql-server/
"Server" vs "Data Source" in connection string
http://msdn.microsoft.com/en-gb/library/system.data.sqlclient.sqlconnection.connectionstring.aspx
答案 1 :(得分:0)
there is no difference between Server and Data Source as they represent
the same thing for SQL Server : the full name of the SQL Server instance with
the syntax "MyComputerName\MyShortInstanceName" , potentially including the
port used by the SQL Server instance to communicate.
Data Source
-or-
Server
-or-
Address
-or-
Addr
-or-
Network Address
是同义词
what is the difference between using data source = and using server = in connection string
“Server” vs “Data Source” in connection string