Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Populate a Treeview from Database in VB6.0

Populate a Treeview from Database in VB6.0

Scheduled Pinned Locked Moved Visual Basic
databasedata-structureshelpquestion
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kshincsk
    wrote on last edited by
    #1

    Hi I would like to populate data from a database into a treeview in vb6.0 application. I have a table in this format Child Parent 1st Level 2nd Level 3rd Level 50000011 50014561 GB_3623 GB_3440 50000012 50000012 GB_3908 GB_5000 50000012 50000012 GB_3908 GB_5000 50000013 50026347 50000014 50010875 GB_6135 GB_5000 50000015 50010414 50000017 50000017 GB_3922 GB_3900 GB_5000 50000018 50000018 GB_3220 50000018 50000018 GB_3220 50000019 50010473 GB_3440 50000019 50010473 GB_3440 etc etc etc. Now from this table to my vb6 form 3rd Level is GreatGreatGrandparent, 2nd Level is GreatGrandparent, 1st Level is Grandparent, Parent is parent & Child is is child I want to represent this in a tree view control in vb6.0 and when I search from my form for any of the five fields mentioned above, the treeview should highlight that particular node and set the expanders on that particular hierarchy. I am not familiar with treeview control at all. Can someone help me please? Yours desperately , Kumar.

    C 1 Reply Last reply
    0
    • K kshincsk

      Hi I would like to populate data from a database into a treeview in vb6.0 application. I have a table in this format Child Parent 1st Level 2nd Level 3rd Level 50000011 50014561 GB_3623 GB_3440 50000012 50000012 GB_3908 GB_5000 50000012 50000012 GB_3908 GB_5000 50000013 50026347 50000014 50010875 GB_6135 GB_5000 50000015 50010414 50000017 50000017 GB_3922 GB_3900 GB_5000 50000018 50000018 GB_3220 50000018 50000018 GB_3220 50000019 50010473 GB_3440 50000019 50010473 GB_3440 etc etc etc. Now from this table to my vb6 form 3rd Level is GreatGreatGrandparent, 2nd Level is GreatGrandparent, 1st Level is Grandparent, Parent is parent & Child is is child I want to represent this in a tree view control in vb6.0 and when I search from my form for any of the five fields mentioned above, the treeview should highlight that particular node and set the expanders on that particular hierarchy. I am not familiar with treeview control at all. Can someone help me please? Yours desperately , Kumar.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why on earth are you writing code in VB6 ?

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups