On 4/19/07, Graham Brown (CompSYS) <[EMAIL PROTECTED]> wrote: > Thanks! Yep. This is effectively what I'm doing with the cursors. > Was trying to work out if I can do this another way due to the speed of the > thing.
I've worked with systems that only created the top level before displaying the cursor, and stuffed a dummy record into the branches to make the [+] appear. When a branch was expanded, the query was run for that sub-branch. Obviously, if you need to -pre-calculate some roll-ups (like the total price or shipping weight), this technique won't work. This isn't really an application for SQL, but ought to be run with procedural code using recursion. There are some good examples of that code around if you Google for it. Joe Celko has some good material on modeling hierachies in "SQL for Smarties." And Andy and Marcia talked about "Rip Fields" in a FoxTalk article in... maybe 2002? that dealt with managing heirarchies. They also cover treeviews (or perhaps it ws Rick Schummer) in MegaFox. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

