数据库登录验证-链接字符串中的细节

最近学习数据库,网上看到  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

你可能感兴趣的:(C#)