To read the article online, visit

A System to Order Links Taken From a Database

By Bob

In a previous article, Ordering Links Taken From a Database, I described a system where a number of menu items and submenu items needed to be presented. The order of these items was important too, and independent of the order with which they were entered into the database. Therefore, I needed to create an administration page that would allow my users to easily order the links.

In Ordering Links Taken From a Database, I discussed the theory of this application. In today's article, I am presenting the source code! You can download the application is ZIP or RAR format down below. Also, some screenshots are shown at the bottom of this article.

To install the web application, just un-zip or un-Rar the attatched file into a directory on your ASP-enabled server. I just have mine in the root of my PWS.

If you set it up like I did you would access the demo home page like this: http://localhost/default.asp
and the admin page like this: http://localhost/admin/default.asp

The database is stored in the admin directory. Password protect the admin directory to protect the admin pages and the database. From there it's all pretty self explanatory.

New features allow you to make that menu hierarchy as deep as you like, and the order of menus is now changed with little arrow buttons. I also re-wrote the interface on the front of the admin page and added a site statistics page. Plus, you can cut and paste entire menu trees! This makes it damned easy to reorganize your site.

For demo purposes, I just set up a site with random articles from

I'll apologize in advance for the lack of commenting and some of the obscure code in places. I usually don't go to a lot of trouble on comments on something this small and straight-forward not to mention it's the product of quite a few late nights. If you find any blatently bad coding, please let me know.

I worked pretty hard on this; if you decide to use part of this code or the entire application please give credit where credit is due. I am a very poor college student who likes computer toys and fine beers (a lot), so if you decide to use this for commercial purposes (i.e. your business's intranet or Internet site) you have to pay me something out of common courtesy and your profits (heh, heh, j/k).

In any case, I'd love to see how you guys apply this. E-mail me with links and descriptions! If you think this calls for another article, let me know and I'll throw something together and submit it.

Thanks for all of you interest in my first article!!

Note: you must have ADO 2.0 or greater installed, since the OLE-DB driver is used in You can download ADO 2.0 for free, or you can just alter so it uses a DSNless connection or a System DSN.


  • Download the application in ZIP format (27 KB)
  • Download the application in RAR format (25 KB)


    Start Page Viewing an Item The Administration Page

  • Article Information
    Article Title: A System to Order Links Taken From a Database
    Article Author: Bob
    Published Date: Saturday, November 13, 1999
    Article URL:

    Copyright 2019 QuinStreet Inc. All Rights Reserved.
    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers