Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 585
  • Last Modified:

breadcrumb trail in vbscript

I need some VBScript code to output a breadcrumb trail assuming were in the section Press Releases of a table called "test1". This table has got a column named "Section".
table.bmp
0
JDandLarLar
Asked:
JDandLarLar
1 Solution
 
JoachimMartinsenCommented:
Play around with this little function:
function getTrails(ByVal intId)
	set objRS = server.createobject("adodb.recordset")
	intCurId = intId
	do until intCurId = 0
		if isnumeric(intCurId) then
			objRS.open "SELECT Section,ParentID FROM test1 WHERE Id="&intCurId&"",con
			if not objRS.eof then
				intCurId = objRS("ParentID")
				strTrail = strTrail & objRS("Section") & ","
			end if
			objRS.close
		else
			intCurId = 0
		end if
	loop
	set objRS = nothing
	getTrails = strTrail
end function

Open in new window

0
 
JDandLarLarAuthor Commented:
thanks.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now