Torna al Thread
Dim categoria As String = "SELECT id, descrizione, IDNodoPadre, IDNodoRadice FROM articoli_categorie "
Dim popola As New MySqlCommand(categoria, db.connessione)
Dim myReader As MySqlDataReader
Try
db.connetti()
myReader = popola.ExecuteReader()
frmNuovoArticolo.trwCategoria.BeginUpdate()
While myReader.Read
Dim padre As Integer = myReader.Item("IDNodoPadre")
Dim radice As Integer = myReader.Item("IDNodoRadice")
frmNuovoArticolo.trwCategoria.Nodes(padre).Nodes.Add(myReader.Item("descrizione"))
frmNuovoArticolo.trwCategoria.Nodes(myReader.Item("IDNodoRadice")).Nodes.Add("descrizione")
End While
frmNuovoArticolo.trwCategoria.EndUpdate()
db.disconnetti()
Catch ex As Exception
MsgBox(ex.Message)
db.disconnetti()
End Try