当我尝试连接数据库时,我收到数据库登录错误。我使用的连接是"Data Source=IK-PC\\SQLEXPRESS;Initial Catalog='abc.new';Persist Security Info=True;User Id=IK-PC\\Administrator"
所有内容都显示在SQL Management Studio Connect to Server表单上。我的数据库名称是abc.new,它附加到SQLMS。
答案 0 :(得分:0)
如果您在SQL Server中使用Windows登录,则应使用Integrated Security=True
(或Integrated Security=SSPI
)而不是用户ID和密码。
"Data Source=IK-PC\\SQLEXPRESS;Initial Catalog='abc.new';Persist Security Info=True;Integrated Security=True"
然后,您需要以IK-PC \ Administrator用户身份运行访问SQL Server的进程。