Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 528
Viewed: 2967
Added: Sep 01, 2004
Version: unknown
Snippet uploaded by: Lhobbs
Written By: Larry Hobbs
Demo: Sorry, no demo

User Rated at: 3 Stars3 Stars3 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

This is a simple ASP page to read an Access Database and build a page to display your stored links.

You will need an Access Database with the following Tables:
 Cat01 (Catagories for your links to fall under)
  CatKey - AutoNumber
  CatName - text
  CatDescription - text
  LinkKey - AutoNumber
  LinkURL - text (Do not include http://)
  LinkDescription - text
  LinkCat - text (In this field you will enter the CatKey field to the cooresponding Catagory. You can have a link in multiple Catagories by separating them with a '; ').



' Connection to Database
set conn=CreateObject("ADODB.Connection")

'Recordset to link table
set rs=CreateObject("ADODB.recordset")
rs.ActiveConnection = conn
rs.Source = "SELECT LinkURL, LinkDescription, LinkCat FROM Link01 ORDER BY LinkDescription"

'Recordset to catagory table
set rsCat=CreateObject("ADODB.recordset")
rsCat.ActiveConnection = conn
rsCat.Source = "SELECT CatKey, CatName, CatDescription FROM Cat01 ORDER BY CatDescription"


do until rsCat.EOF
'Starting a table with a header titled the catagory
Response.Write("<table width='200' border='1'>")
Response.Write("<tr><th>" & rsCat.Fields("CatDescription") & "</th></tr>")
do until rs.EOF
'Load all the links that are in that catagory
LCat = split(rs.Fields("LinkCat"), ";")
for i = LBound(LCat) to UBound(LCat)
if trim(LCat(i)) = trim(rsCat.Fields("CatKey")) then
'The way the hyperlink is setup, when the user clicks the link, it will go to the site in a new window
Response.Write ("<tr><td><a href='http://" & rs.Fields("LinkURL") & "' target='_blank'><b>" & rs.Fields("LinkDescription") & "</a></td></tr>")
end if
set rs = nothing
set rsCat = nothing
set conn = nothing

No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2018 All Rights Reserved. Conditions