一段代码是:Data Source=(Local);Integrated Security=SSPI;Initial Catalog=northwind一段代码是:Server=(Local);Integrated Security=SSPI;database=northwind数据库连接,在c#入门经典和c#高级编程里看到两种连接方式,想知道为什么,有什么利弊,原理又是什么?有什么不一样?谁能说一下?请明白人详细讲一下,小弟不才,特来请教没多少分,先给100分吧
解决方案 »
- c# DirectShow播放器
- 服务器:CPU内存占用在涨;工控机上一个软件CPU100%
- C# winform 圆角无边窗体,怎么让Normal和切换到Maximized,都能让窗体完整显示呢?
- 请大家帮忙翻译这个段代码
- C# ASP。net在网页 中怎么打开一个对话框,获得一个文件的全路径,是如 f:\\backup\\backup.txt 这样的全路径。 在线===
- 关于WebService异步调用的一点小疑问?
- 不同机器 sql 数据 导入问题
- 高分寻求高手出现(100)
- 刚写好报表设计器的设计部分, 打印时表达式处理用哪一种方法好?
- IList排序问题,高手手请进
- ReadLine()读入的数字字符串没办法转换成int类型吗?
- 关于画图的问题
- or -
"Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"
(both connection strings produces the same result)
Trusted Connection:"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or -
"Server=Aron1;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)(use serverName\instanceName as Data Source to use an specifik SQLServer instance, only SQLServer2000)
Connect via an IP address:"Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))
Integrated Security=SSPI;//这是信任连接
Initial Catalog=northwind//数据库名
俩者的用法都一样,没有什么大的差别,只是表现形似不同而已。