Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Want recursive SQL query function to generate breadcrumb navigation
I'd want to make a custom class that will generate breadcrumb navigation for
my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've
structured my database with hierarchical parent/child relationships.  Can
someone help me set up the code structure?

I'm using ASP VBScript, and I have a table structure similar to the
following:

NavItems
----------
NavitemID (PK)
Nav_ParentID
Nav_Name

The top level record in the entire table is "1", but it would be nice if I
could parameterize the function so that I could specify the ID of the
current page and the ID of the topmost ID I want to trace to, e.g.

GetTrailOfBreadcrumbs(CurrentNavitemID, TopmostNavitemID)

The least expensive approach from the standpoint of the database would be
something that used something besides ADO recordsets to grab the data. If
someone has some code lying around or can offer some guidance, I'd sure
appreciate it.

Thanks.

-KF



Report this thread to moderator Post Follow-up to this message
Old Post

03-30-05 08:56 AM


Re: Want recursive SQL query function to generate breadcrumb navigation
kenfine@u.washington.edu wrote:
> I'd want to make a custom class that will generate breadcrumb
> navigation for my site via a recursive query, e.g. Home > Page1 >
> Subpage 1. I've structured my database

What database? It's relevant.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
03-30-05 01:55 PM


Re: Want recursive SQL query function to generate breadcrumb navigation
I use SQL Server 2000, and I have access to stored procedures.

Whatever's returned by the DB needs to have more information than just the
text label, since I'm also going to want to be generating HTML links from
this. My database table includes a "link" field.

Thanks again, Bob.

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:umeLgISNFHA.2356@TK2MSFTNGP14.phx.gbl...
> kenfine@u.washington.edu wrote: 
>
> What database? It's relevant.
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>



Report this thread to moderator Post Follow-up to this message
Old Post

03-30-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:03 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.