如何根据现有的数据库用VB的TreeVieww来生成四级树
已知:
select pronum from [ProjectReg]
select pronum,pronum1 from [ProjectJiZai]
select pronum,pronum1,pronum2 from [rollreg]
select pronum,pronum1,pronum2,pronum3 from [filesreg]
----------------------查询结果
A
A22222
A22222
A2222233
A2222244
A2222233333
A2222244444
--------------------------------------如何用VB的TreeVieww生成四级树
A
22222
33
333
44
444
[解决办法]
此处有源码:
http://www.egooglet.com/static_html/200511072148394945admin.html
没有级别限制,DLL,只需简单调用即可。
[解决办法]
三级目录的地方写错了,先定义一个Node变量,然后写成
'三级目录开始
Set mRS2 = cnMain.Execute( "select distinct pronum2 as pronum2 from [rollreg] where pronum= ' " & nImage & " ' and pronum1= ' " & nImage1 & " ' ")
If mRS2.RecordCount > 0 Then
mRS2.MoveFirst
Do While mRS2.EOF = False
nImage2 = mRS2.Fields( "pronum2 ")
Set oNodex2 = TreeView1.Nodes.Add(oNodex, tvwChild,, nImage2, 2)