如何使用Windows身份验证在sql server 2008中建立连接字符串?我使用过这段代码:
<add name="EmployeeDatabase" connectionString="Data Source=TVPC0006\SQLEXPRESS;Initial Catalog=EmployeeDatabase;" providerName="System.Data.SqlClient" />
答案 0 :(得分:2)
您需要拥有的可信连接:
Data Source =myServerAddress;
Initial Catalog =myDataBase;
Integrated Security =SSPI;
答案 1 :(得分:1)
您需要Integrated Security=SSPI
或Trusted_Connection = True;