private static string connStr { get { SqlConnectionStringBuilder sb = new SqlConnectionStringBuilder(); sb.DataSource = "127.0.0.1"; sb.InitialCatalog = "數據庫名稱"; sb.UserID = "登錄名"; sb.Password = "登錄密碼"; sb.IntegratedSecurity = false; return sb.ConnectionString; } }