Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Related a record to another record in the same file ad-infinitum.

Related a record to another record in the same file ad-infinitum.

Related a record to another record in the same file ad-infinitum.

Firsty I'm a Clarion virgin, so please be gentle with me (only 20+ hours of C5 use and gagging to get going)!!
I want to create a Parent_Child database (for task management). There is only one primary table (not including secondary tables attached to it. Each record has a unique ID number and a refence to its parent's ID. The parent's ID actually refers to the unique ID of another record in the same table (any record except itself).
I have managed to create a relation by using an ALIAS. (So what's your problem - I hear you ask!).
Ideally I would like to display these 'Tasks' in Tree form allowing the user to add Children to Parents until their heart's content.
In VB(Access) the relational tree (an ActiveX control) HAS to be built through code. It is not possible to attach a dataset to it dynamically. However you define a 'Node' which (except the very first) has to attach to another (existing) 'Node'.
QUESTION (finally!)
How do I create/build a data set of records for the relation tree control to display (I would rather not be limited to the 29 levels, but thats not the biggest issue).
I have no problem with building the dataset with code (I have always had to before). The only way I can see to solve this issue at present is to define (upto)29 Parent-Child Related ALIAS files in the dictionary or with code and fill them with a recursive procedure - which I am happy to do, but it seems somehow.....tacky and resource hungry.
Any help would be very gratefully appreciated
Kirk Jewell
Acqwell Systems (London) Ltd
+44 020 8523 4233

RE: Related a record to another record in the same file ad-infinitum.


i think you should use a queue technique to solve you problem for which you will have write an embedded code and create you own levels thru coding which can be much faster and easier task to solve your problem.. try it and let me know

RE: Related a record to another record in the same file ad-infinitum.

I guess this is the same question as the other thread and it looks like you have already found out about using Alias files to format the tree. Basically when you ask for a Tree format, a extra field called _Level is added. If you want to handcode the Queue and you want page-by-page loading, you have to take care of it yourself. If the dataset is small you could generate the whole queue and display it.

Queue:Browse:1 QUEUE
ORG:ID           LIKE(ORG:ID)
ORG:Name         LIKE(ORG:Name)
ORG:Name_Level   LONG !Tree level  <------
Mark             BYTE
ViewPosition     STRING(1024)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close