Hi,

I have written a few lines in ASP but I'am not sure if it is the fastest way of doing it.

My problem:
I have a one table entitled tblCat with a unique field ID. Each row of the table is linked to a child (row). For example:
ASP :: Scripts :: clocks
The three categories are three rows of my table for example
ASP (ID=1/Child=0)
Script (ID=2/Child=1)
Clocks (ID=3/Child=2)
Date&time (ID=4/child=1)

Now I have written the following code the get the string
Home :: ASP :: Scripts :: clocks

<!-- #include file="conn.asp" -->
<%
str = ""
first = true
item = request.queryString("id")
if(item <> "") then
while (item <> 0)
objRS.open "Select * from tblCat where id="& cint(item),objConn,1,2
item = objRS("child")
if first = true then
str = objRS("name")
else
str = "<a href='link.asp?id="& objRS("id") &"'>"& objRS("name") & "</a> :: " & str
end if
first = false
objRS.close()
wend
str = "<a href=link.asp>Home</a> :: " + str
response.write(str)
end if
%>

Thanks in advance
Pieter