Hi,
Each time i need to copy one term in a treeview( we suppose the treeview is composed with terms only) and all its childs, from one place to another , i need to insert in the table MICRO_THESAURUS ( because when i copy a term it makes part also of a new micro_thesaurus) this term with all its childs.
For example if i have this part of the tree, which is composed with the terms which tag is 15,14,8,4 and the terms which tag 14,8,4 are childs of the term which tag = 15
The micro_thesaurus number's of 'economy ' =3 and the micro_thesaurus number's of 'history' is =5 ( it corresponds to the field 'id_terme_source' of the table MICRO_THESAURUS)
[blue]
economy
15
14
8
4
[/blue]
and i want to copy this part of the tree in the microthesaurus = history
[blue]
history
15
14
8
4
[/blue]
How can i do this?
the sql request i can do until now is this one
[green]
INSERT into MICROTHESAURUS( id_terme_source,id_microthesaurus) values
(15,5)
[/green]
[red]
but we can not see all the childs of the term which tag =15 in this sql request!
[/red]
Could you help me on this point?
Last time Jebenson help me well for updating a node with this sql request
[blue]
sqlUpdateGeneriques = "update GENERIQUES set ID_TERME_GENERIQUES = ParentTag where ID_TERME_SOURCE_G IN ("
For Each ChildNode As TreeNode In TreeView1.SelectedNode.Nodes
sqlUpdateGeneriques &= ChildNode.Tag & ","
Next
'remove trailing comma
sqlUpdateGeneriques = Mid(sqlUpdateGeneriques, 1, Len(sqlUpdateGeneriques) - 1)
sqlUpdateGeneriques &= ")"
[/blue]
[green]Perhaps he could me this time on this point, but this question is absolutely opened to everyone[/green].
Thanks a lot from you.
Best regards.
Nathalie
Each time i need to copy one term in a treeview( we suppose the treeview is composed with terms only) and all its childs, from one place to another , i need to insert in the table MICRO_THESAURUS ( because when i copy a term it makes part also of a new micro_thesaurus) this term with all its childs.
For example if i have this part of the tree, which is composed with the terms which tag is 15,14,8,4 and the terms which tag 14,8,4 are childs of the term which tag = 15
The micro_thesaurus number's of 'economy ' =3 and the micro_thesaurus number's of 'history' is =5 ( it corresponds to the field 'id_terme_source' of the table MICRO_THESAURUS)
[blue]
economy
15
14
8
4
[/blue]
and i want to copy this part of the tree in the microthesaurus = history
[blue]
history
15
14
8
4
[/blue]
How can i do this?
the sql request i can do until now is this one
[green]
INSERT into MICROTHESAURUS( id_terme_source,id_microthesaurus) values
(15,5)
[/green]
[red]
but we can not see all the childs of the term which tag =15 in this sql request!
[/red]
Could you help me on this point?
Last time Jebenson help me well for updating a node with this sql request
[blue]
sqlUpdateGeneriques = "update GENERIQUES set ID_TERME_GENERIQUES = ParentTag where ID_TERME_SOURCE_G IN ("
For Each ChildNode As TreeNode In TreeView1.SelectedNode.Nodes
sqlUpdateGeneriques &= ChildNode.Tag & ","
Next
'remove trailing comma
sqlUpdateGeneriques = Mid(sqlUpdateGeneriques, 1, Len(sqlUpdateGeneriques) - 1)
sqlUpdateGeneriques &= ")"
[/blue]
[green]Perhaps he could me this time on this point, but this question is absolutely opened to everyone[/green].
Thanks a lot from you.
Best regards.
Nathalie