Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex Recordset Navigation - Please advise.

Status
Not open for further replies.

Boblevien

Technical User
Nov 3, 2000
38
GB
Hi,

Can anyone help? I have a Recordset of replies to a question and replies to the replies. There is no limit to how deeply they can be nested (replies to replies to replies to…etc). Each record contains a Message Id (MID)and a Parent ID (PID) which holds the Message ID of the parent record. The records are sorted by MID(but could be sorted by PID if that helped.

I want to navigate the Recordset with Vbscript & ASP to produce an HTML page which displays the dialogue thus:

Recordset:
MID PID
1 0
2 1
3 1
4 2
5 1
6 2
7 4
8 4
9 7
10 8
11 6
12 4

HTML order:

Message 1
Message 2
Message 4
Message 7
Message9
Message 8
Message 10
Message 12
Message6
Message 11
Message 3
Message 5

It’s doing my head in! Any ideas?

Alternatively, can anyone suggest a different, more appropriate, record structure?

Bob Levien.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top