hc98br
ISP
- Aug 14, 2003
- 46
I have a list of records in a table, each with an ID and each with a parentId, this is the record id of another record in the table.
I want to draw a heretical tree of the data, so recursive function is needed.
My first though looked like it would work but I called the database within the recursive function, so I just get "Operation is not allowed when the object is open." on the second call - of course.
What is the best way to tackle this, I've found code that dumps the database into arrays first, then search through on each call of the function, but this seem clumsy - is it the best way though?
Thanks
Ben.
I want to draw a heretical tree of the data, so recursive function is needed.
My first though looked like it would work but I called the database within the recursive function, so I just get "Operation is not allowed when the object is open." on the second call - of course.
What is the best way to tackle this, I've found code that dumps the database into arrays first, then search through on each call of the function, but this seem clumsy - is it the best way though?
Thanks
Ben.