Dim cmd As new SQLCommand cmd.CommandText = "select '按分组' as 分组, 省, 市, 区县, 乡镇, 街道居委会 from {客户分组} where 省 is not null" cmd.CommandText &= " union select '按等级', 客户等级, null, null, null, null from {客户等级} where 客户等级 is not null" Dim dt As DataTable = cmd.ExecuteReader Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree(dt, "分组|省|市|区县|乡镇|街道居委会")