Dim cmd As New SQLCommand Dim dt As DataTable cmd.CommandText = "SELECT * From {居民电站}" dt = cmd.ExecuteReader() Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree(dt,"名称","", "_Sortkey,_Identify desc") trv.Nodes.Insert("加载所有数据",0)