D
Do
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
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