Results 1 to 3 of 3

Thread: [RESOLVED] Create nodes treeview from database

  1. #1

    Thread Starter
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Resolved [RESOLVED] Create nodes treeview from database

    Ola,

    I'm trying to create nodes from a .sdf database according to a specific value in a combobox.
    Code:
    strConn.Open()
    Dim cmd_title As New SqlCeCommand("SELECT titles FROM myTable WHERE mytype = '" & cbo_type_select.Text & "'", strConn)
    reader = cmd_title.ExecuteReader
    While reader.Read
    Dim tnode As TreeNode
    .... how do I continue from here?
    End While
    Some help would be great. Thanks in advance.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Create nodes treeview from database

    E.g.
    vb.net Code:
    1. While reader.Read()
    2.     myTreeView.Nodes.Add(reader.GetString(0))
    3. End While
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: Create nodes treeview from database

    Thanks jmc. Helped me great. +REP.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width