[求助]谁来帮我看一下这一段代码有什么问题?
谁来帮我看一下这一段代码有什么问题?
Public Sub treeView()
strSql = "select * from sysobjects where xtype='u'"
ADOrs.open strSql, ADOcn, 3, 1
Dim mnode As Node
With TreeView1
.Nodes.Clear '清除树内容
.Nodes.Add , , "ROOT", "数据库"
End With
Do Until ADOrs.EOF
Set mnode = TreeView1.Nodes.Add("ROOT", tvwChild, ADOrs.Fields(0).Value, ADOrs.Fields(0).Value)
ADOrs.MoveNext
Loop
ADOrs.Close
End Sub
Private Sub form_load()
Set ADOrs.ActiveConnection = ADOcn
treeViewtreeView
End Sub
注:数据库在模块里面已进连接上了