sqlconnection.connectionstring="Persist Security Info=False;Integrated Security=SSPI;database=northwind;server=mySQLServer"
oledbconnection.connectionstring="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI"
上面是通过windows身份验证来登陆的
我想问的是sqlserver中想通过sa帐户来登陆的话如何写连接字符串?
qlconnection.connectionstring="Persist Security Info=False;UId=sa;Pwd=xxx;database=northwind;server=mySQLServer"
oledbconnection.connectionstring="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;User id=sa;password=xxx"