ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
The Top 10 ASP Links @
What is and Why Do I Need It?
An Overview of ASP.NET

Persistent Radio Buttons
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

The ASP 101 Discussion Forum The ASP 101 Discussion Forum by John Peterson

Enough Already, How Do I Get a Copy?

So you've heard about it's checkered past, and you still want to take a look at the code and maybe use the forum on your site.  You either haven't been listening or you're far braver that I thought you were!  Oh well, here goes... 

First the warnings!  Like I've told everyone whose asked, this code was never meant for public consumption.  Here's a quick run down of what I mean by that: 

  1. It makes sense to me because I wrote it. It won't to you because you didn't!
  2. It's not commented to our normal standards. As low as those normally are, this is worse!
  3. It's not very modular. (There's about 3 rolls of duct tape holding it all together!)
  4. It's still constantly being changed, so whatever version you have... it's too old!
  5. Watch out for ShowChildren!!! (Take a look and you'll see what I mean!)
  6. Our e-mail notification isn't using CDONTS so you figure it out!
  7. It'll run against both Access and SQL Server, if you know the secrets!

All kidding aside, don't put too much faith into this forum.  Don't get me wrong, it runs, but I don't want anyone to start using it, put it up on the internet, and then be upset when it breaks because you're getting a post every 2 seconds.  It hasn't been tested except for what you see here on the site, and with the constant changes to the code, I wouldn't thoroughly trust it even if it had.  Now that I've scared everyone away, let me seriously address some of the points I made above. 

  1. If anything doesn't make sense, or you're wondering what I was doing with a particular line of code, let me know and I'll try and explain my thinking.
  2. There are some sparce comments, but they're mostly comments to myself so... see #1.
  3. Before you hack and slash any code or make any adjustments, make sure you've found every place it's being called from and that your changes won't cause any nasty side effects.
  4. Not too much you can do here, but before you spend too much time trying to fix something, check with me. It may already be fixed!
  5. ShowChildren... This is actually somewhat embarassing.  This function absolutely pounds on your database.  It was written as a quick and dirty, let's try this approach, type of deal and somehow it made it into the production code.  It originally was used when we showed the open forum to show the entire forum tree.  (Actually from a code style point of view, I liked that version of the code more than the current one.)  The issue with the function is that each time it's called it opens a recordset.  That wouldn't be too big a deal, but it then recurses into itself!  You can imagine the number of recordsets we were opening when we were running the earlier implementation I was just talking about.  Luckily, we don't call it on as large sets of data anymore.  (It's only called to show the thread you're in when you view a message.)  It's still bad code, but what can I say but.... oops! 
  6. The notification is using Steve Genusa's ASPMail since that's what we had available.  It's a simple change to whatever component you normally use.  The code can be found in post_message.asp if you're interested.
  7. To move back and forth from Access to SQL, you need to change the DB_CONNECTIONSTRING at the top of common.asp, and one line which you'll find a comment for in the InsertRecord function also in common.asp.

I think that should just about do it.  As long as I'm not in the middle of changing it again, the code is available here.  Good luck with the forum and if you have any questions or if it gives you any trouble, you can e-mail me at and I'll be happy to speak to it on you're behalf.

Update: To ease support and version control, I've added a Forum Revision page which tracks versions and known issues with the current version of the forum. Please go to there to obtain the code.

<-- Previous Page

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers