最近学习数据库,网上看到 SqlConnection conn = new SqlConnection(str); 的 str 有2种格式,看了一篇博文才知道是数据库登录的方式不同:
string str = @"Data Source=LXF-PC;Initial catalog=LoginTable;integrated Security=True"; //这种是使用Window验证方式登录
string Inform = "server=LXF-PC;uid=sa;password=mysql2008;database=LoginTable"; //这种事SQL Server验证方式登录
博客园 https://www.cnblogs.com/zyf/p/3575185.html