1 SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); 2 3 builder.DataSource = ""; 4 builder.InitialCatalog = ""; 5 builder.IntegratedSecurity = true; 6 7 string connectionString = builder.ConnectionString;
这样也可以构造数据库连接字符串。
时间: 2024-10-10 23:29:24