Dim kontrol As Boolean
Dim rsm As New ADODB.Recordset
rsm.Open("categories", conn, 1, 3)
If Err.Number 0 Then
MsgBox(Err.Description)
End If
While Not rsm.EOF
Dim rskontrol As New ADODB.Recordset
rskontrol.Open("select * from categories where parent=" & rsm("catid").Value, conn, 1, 3)
If rskontrol.EOF Then
kontrol = False
Else
kontrol = True
End If
If kontrol = False Then
Dim parentnode As New TreeNode
parentnode.Text = rsm("catname").Value
parentnode.Name = "rs" & rsm("catid").Value
parentnode.Tag = "rs" & rsm("catid").Value
tw.Nodes.Add(parentnode)
rsm.MoveNext()
End If
If kontrol = True Then
Dim parentnode As New TreeNode
parentnode.Text = rsm("catname").Value
parentnode.Name =
parentnode.Tag = "rs" & rsm("catid").Value
tw.Nodes.Find("rs" & rsm("catid").Value, True)(0).Nodes.Add(parentnode)
rsm.MoveNext()
End If
rskontrol.Close()
rskontrol = Nothing
End While
rsm.Close()
rsm = Nothing
End Sub
__________________
vb treeview fill hatası dolduramadım yanlış olan ne?
Programlama0 Mesaj
●21 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Programlama
- vb treeview fill hatası dolduramadım yanlış olan ne?