strSql = "delete from yg_net_info where id in (select id from yg_net_info start with ref_id= " & clKey.getValue & "connect by prior id=ref_id)"
If (clKey.getValue <> 0) Then yg_exec_sql strSql '删除下面的第归层次 yg_exec_sql "delete from yg_net_info where id=" & clKey.getValue & "" TreeView1.Nodes.Remove (yg_getK(clKey.getValue)) clKey.setValue 0 End If
要看你的数据结构的 我的数据库里有个专门的编码(也作为KEY的) 比如 1 11 112 113 114 115 12 121 123 .....只要找到了key 用我上面写的语句 再来个delete from table where dm like "12%" 就可以了
If (clKey.getValue <> 0) Then
yg_exec_sql strSql '删除下面的第归层次
yg_exec_sql "delete from yg_net_info where id=" & clKey.getValue & "" TreeView1.Nodes.Remove (yg_getK(clKey.getValue)) clKey.setValue 0
End If
我的数据库里有个专门的编码(也作为KEY的)
比如
1
11
112
113
114
115
12
121
123
.....只要找到了key 用我上面写的语句
再来个delete from table where dm like "12%"
就可以了