Recursive VB.net function

Discussion in 'ASP .Net' started by Do, Nov 15, 2003.

  1. Do

    Do Guest

    Hi,

    I'm having a small problem with a recursive vb function

    The output I'm looking to get is a string that looks like this Folder 1 >
    Folder 3 > Folder 5
    Folder 5 is a child of 3; and Folder 3 is a child of 1.

    They're actually a folder structure put into a database.

    FolderID Name ParentID
    1 Folder 1 0
    2 Folder 2 0
    3 Folder 3 1
    4 Folder 4 2
    5 Folder 5 3
    6 Folder 6 4


    I know this is a recursive function.
    I pull back the data in a datareader and work with it in a loop.
    I know somewhere in the loop, I recall the function to append the parent
    folder
    and continue.

    I can't seem to get it to work. I'm going to output to the string and set
    it in a label.

    Thanks,

    Do
     
    Do, Nov 15, 2003
    #1
    1. Advertising

  2. Do

    Natty Gur Guest

    Natty Gur, Nov 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tyron

    Recursive function

    Tyron, Apr 16, 2004, in forum: VHDL
    Replies:
    1
    Views:
    629
    valentin tihomirov
    Apr 16, 2004
  2. n00m
    Replies:
    12
    Views:
    1,115
  3. vamsi
    Replies:
    21
    Views:
    2,081
    Keith Thompson
    Mar 9, 2009
  4. Mark Piffer
    Replies:
    9
    Views:
    911
    luserXtrog
    May 15, 2009
  5. Alok
    Replies:
    3
    Views:
    253
Loading...

Share This Page