CoverYourASP --> Newsletter archives

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
149 active users
3176 visitors today
2355 pages today
(only part of today)
Tools I use

Copyright © 1999-2016 James Shaw.
All rights reserved.

RSS submissions

Now open source with SourceForge!

Pick a newsletter to read - you can receive these every Saturday by subscribing.

You can also read the article that describes how this is implemented.

undefined NaN NaN

Jun 5 2002

Apr 30 2002

Mar 31 2002

Feb 28 2002

Jan 23 2002

Jan 22 2002

Jan 15 2002

Jan 14 2002

Jan 7 2002

Dec 24 2001

Dec 11 2001

Nov 27 2001

Nov 12 2001

Aug 1 2001

Jul 14 2001

Jun 24 2001

Jun 10 2001

May 26 2001

May 12 2001

Apr 30 2001

Apr 22 2001

Apr 14 2001

Apr 8 2001

Mar 29 2001

Mar 24 2001

Mar 17 2001

Mar 10 2001

Mar 3 2001

Feb 24 2001

Feb 17 2001

Feb 10 2001

Feb 3 2001

Jan 27 2001

Jan 20 2001

Jan 13 2001

Jan 6 2001

Dec 30 2000

Dec 23 2000

Dec 16 2000

Dec 9 2000

Dec 2 2000

Nov 29 2000

Nov 25 2000

Nov 18 2000

Nov 11 2000

Nov 4 2000

Oct 28 2000

Oct 21 2000

Oct 14 2000

Oct 9 2000

Oct 7 2000

Oct 3 2000

Oct 1 2000

Sep 29 2000

Sep 27 2000

Sep 25 2000

Sep 23 2000

Sep 21 2000

Sep 18 2000

Sep 14 2000

Sep 11 2000

Aug 1 2001


              C o v e r Y o u r A S P . c o m

             Welcome to the latest newsletter!


What a fun two weeks! Three very cool new features have been
added to the site - first, a huge new job section covering
the whole IT industry is now live.

Built in association with has already proven a popular
place to check out your next employer!

Second, the CoverYourASP store is now open. I just had to do
it for a laugh! I don't make a cent off the items for sale,
but if you need a new mug, cap, or even boxer shorts you
know where to go.

And, no, unfortunately they wouldn't let me print the CYA
logo in the obvious position on the boxer shorts. =;-)

Check it the store at

Last but definitely not least Charles Carroll of and fame has
created a mailing list just for you and I to discuss the
CoverYourASP code, and to continue to build the great
CYA community we have!

More on that later...


        A   W O R D   F R O M   M Y   S P O N S O R S


IP*Works! V5 ASP Edition includes 35 components, optimized
for Active Server Page programming.  The standard IP*Works!
components are all included, HTTP, FTP, SMTP, POP, IMAP,
REXEC etc. Also included are new, higher level components
such as WebUpload, WebForm, FileMailer, TraceRoute, and

The package includes sample ASP pages demonstrating how to
access Web Services such as Yahoo Stock Quotes and UPS
Address Verification.



                    T H E   D I A R Y

               The events of the last 2 weeks


15 Jul

- The site had some serious problems this weekend! Starting
Friday PM the site was down almost all weekend - with only
300 page views by 7pm Sunday you understand the enormity
of the problem.

My mail was probably bouncing too, so if you sent me one
please send it again. Sorry!


16 Jul

- Many thanks to the Rene Lariviere and Mark Johnson who
reported that their IE6 crashes when visiting my front page.
It turns out that some (but not all) versions of IE6 don't
like the iframe that this diary appears in!

For now I have disabled the diary for IE6 users, but to see
if it crashes for you you can append ?ShowIE6 to the URL:


20 Jul

- Fancy a pair of boxer shorts with the CoverYourASP logo?
Thought not! But if you did, you could buy some at the
CoverYourASP store! [1]

Get your mugs, mouse mats, T-shirts here too...



24 Jul

- It's a little late to mention this, but tonight is the
Atlanta ASP User Group meeting - read all about it [1].

Tonight Kenny Jones from Microsoft is talking about
"ADO.NET: Powering Data Access in ASP.NET Applications."

See you there?...



25 Jul

- I'm proud to announce a huge new section on CoverYourASP -

Many of you have asked the best way to get yourself a job
working with ASP - now you need look no further. Good luck!



        A   W O R D   F R O M   M Y   S P O N S O R S


                Ready for a Dedicated Server?

              Start shopping for your web server
              today. Take control of your web
              server and realize the benefits of
              increased  reliability and security

   Visit Web Server List at


              H E R O   O F   T H E   W E E K !

Steve Gibson of is this weeks hero.

I've mentioned his website briefly before when recommending
that you read his article[1] about battling a DDOS attack
against his site, but this week I'm concentrating on his
Shields UP! online utility[2].

My development computer at home has a permenant cable
connection, and I leave my computer turned on 24/7, so I'm
a perfect target for people trying to find computers to use
for directing DDOS attacks.

Previously I had used the free ZoneAlarm software[3] to
protect my computer, but a number of minor problems made me
uninstall that a few months ago.

Since then I've been meaning to try another solution, and
after running Shields UP! I finally have solved the problem
by buying a LinkSys router[4].

If you haven't tested your computer security with Shields UP!
DO IT NOW[1]. My computer was  w i d e  open. After simply
plugging in the new router (it was that easy) my computer
does not even appear to exist to anyone probing my IP address.

Now THAT's Stealth mode.

By the way, was the cheapest place to find the router,
and were excellent. The router got shipped same day, and
arrived 2 days after placing the order. At $84 (after $15
rebate), this router is a steal.



           R E C O M M E N D   T H E   S I T E !

        Please recommend my site to your colleagues


OK, more about our mailing list. To start small I'm not
announcing it on the site yet, instead just telling
newsletter subscribers and members. You get to go first!

The list is fully moderated by me, so there won't be any
off-topic mails getting through - if it's not about CYA, it
won't be here. There are already hundreds of asplists to ask
other questions on - 9,000,000 emails last month were moved
by !


To subscribe/unsubscribe from the list, visit:

I think it's going to be great. And don't think that you have
to just listen - if you know the answer to a question or have
some tips or tricks, speak up!

Everybody is welcome. There are some very experienced ASP
developers and some complete newbies - and me somewhere in
the middle. =;-)


               N E E D   A N   A S P   I S P ?

        Use mine. You won't find a nicer bunch of guys.

           Cheap, efficient and extremely helpful.


More and more people are moving their sites to EverPlanet -
even some famous ASP sites like
and a soon-to-be-released "kickin" ASP site. (hush) =;-)

Whether you want to host a little site like my friends cute or a 1,000,000 page view monster, call
Chris Oak at 770 234 9909 and have a chat. He's a nice guy.


                     F E E D B A C K

            Have something to say? Please share!



Steve Smith (President of ASP Alliance):

"You don't need application.lock and unlock in
application_OnStart -- it's only ever executed once, single
threaded, so there are no concurrency issues.  (that's the
one place where you can avoid using lock/unlock)."


Thanks. I guess I knew that but have such an in-grained habit
of using Application.Lock and Unlock they slipped in!


Andrew Haslett:

"Hi James, First of all.. great site. Have found it very
useful even though I'm a VB script man! lol

Anyway, was reading your article about rendering blocks and
the feedback section and remembered reading a test that had
been done.  You may find the experiment done by Ken Schaefer
quite interesting.. he's a pretty reputable source and
contributes to a number of newsgroups that I frequent
(eg p2p.wrox etc)

Anyway, it can be found here:

Cheers, Andrew"


David Levine:

"Thanks for the site and the link to the HitBox Doctor[1].
First thing I usually do is run a program like the one you
listed against the sites own homepage.

They should use their own tool! Try entering their home page as the site to check..."



hehehe! That *is* a little bizarre!


Hi Fredrik.


Dan McKelvy:

"James, I am writing to thank you for all the wonderful
examples. They have been an invaluable aid in my quest to
learn ASP. I was hoping you could help by answering a
question concerning MapPath. I understand it is used to
translate a relative path to an absolute path on the server.

The question is how does it even know what the relative
path is? You pass it a filename only. If I assume the file
could be stored in any directory how does MapPath know what
to return?

If I send MapPath a NULL will it return the server path
associated with the main directory of the URL. This would
look something like:

sPath = Server.MapPath('') might return:
sPath = "d:\\www"

I know the folders that exist and what files are in them.
What I do not know is how to determine the root path for
my files and folders as the server sees them.

Thanks for any help you can offer, Dan"


MapPath does different things depending on the first
character in the path sent in.

If it starts with / the path is treated as a virtual path,
and the physical path computed from there.

If it starts with another character the path is computed
relative to the position of the asp file calling it.

So, calling

Server.MapPath ( '/images/hello.gif' )

from an asp page in


would return


To see where (physically) your current asp page is, you
could do this:

Server.MapPath ( Request.ServerVariables("PATH_INFO") )



"...for those who have their 404 handling file sending
out emails!

Opening my Outlook Inbox this morning I was greeted with
no less than 6800 emails from my web-site! ALL 404's, all
from Internet Explorer 3.02, and ALL seemed to be the
result of HREF's that include JavaScript somehow.

Your site gets quite a bit more coverage than any of mine,
I hope you will include a little mention of this in your
diary or newsletter somewhere to warn any would-be-hapless


Yes, we've talked about this before. I can't remember the
last time I got a 404 email from the site that was actually
a missing file. They are all browser bugs! Nevertheless,
they're handy to know and sometimes worth fixing.

A better solution anyway is to add the file info to an
Application variable[1] and send a single email once an
hour or so...



Here's an email I snagged from one of the private ASPACE mailing
lists that I was kindly invited to join recently...this was from
a thread started when I asked about port scanning:

G. Andrew Duthie:

"Here are some good resources for hardening an IIS box (I just
finished a chapter on Security for one of the ASP.NET books I'm
working on): - Guides from the
NSA for securing Win2K, IIS, and other MS software. Good stuff. - site to
subscribe to Microsoft's Security Notification way
to keep up with when you need to install patches. - List of
security tools offered by Microsoft, including the IIS Hotfix
Checker, IMO the BEST way to automate making sure that your
server(s) have the latest patches installed. I use this, and
modified the scripts to send me email when a new patch is
available (instructions on how to do this are included with the
tool). - IIS 5
Security Checklist. Great doc for what you need to do to secure

That's a good start. For hardware, have a look at the Cable/DSL
routers offered by NetGear and Linksys (I use a NetGear RT 314,
but I've heard good things about the Linksys models as well).
Make sure that the model you buy can do NAT (network address
translation) and packet filtering. Getting one with a web-based
admin interface would be a bonus (mine's telnet-based, and none
too intuitive, but it works)."



"Hi James, I know you do that everyday, but don't know how you
do to merge different tables from your DB.

My users connect to my application through a DB, such as yours.

My DB tables are linked together with id, Now when a user is
identified, I'd like to show him data from more than one table.

Is the best way to do this "merging tables ?"

Thanks again James"


Well, it's not merging, but to show info from two related
tables, use this type of SQL statement:

DBGetRecords ( 'SELECT, Table1.a, Table2.b FROM
Table1 INNER JOIN Table2 ON =' );

This populates the recordset with the id and a columns from
Table1 and the b column from Table2. It matches up the two
tables by saying that they both have an id column which

Let's see how this works with a simple example:

Create Table1 with an "id" autonumber (i'm using Access of
course) and an "a" text column.

Enter the following data:

  1 james
  2 fred
  3 joe

Create Table2 with an "id" autonumber and a "b" text column,
and enter:

  1 shaw
  2 smith
  3 deleteme
  4 bloggs

Then delete the "deleteme" row (!)

Now when you run the query above you'll get the following

  1 james shaw
  2 fred smith

The "joe" and "bloggs" rows didn't have any matching entries
in the other table, so neither are shown.


This all started when I got yet another test newsletter from
someone using my code. I have to leave some email address in
the downloaded database, so I can always tell when someone
is testing.

I sent several emails to them asking them to remove my email
but all went unanswered, so instead I went to their CYA-based
web site to have a look around.

Here's the funny part - the DBadmin.asp page was still there
and the password had not been changed! If you're using my
code, ALWAYS change the password!

Anyway, it was easy then to edit their database and remove my
email address myself... =;-)



"Some guys and I have got into it recently regarding
server-side JavaScript. They claim it is impossible outside
of Netscape servers.  I showed them some examples of your
pages (on IIS), but they still don't see. All of the
documentation seems to support them. So, how do your pages
run on IIS?"


Hehehe. ASP can be written in many languages, even perl, but
VBScript and JScript (MS' identical version of JavaScript)
are the most common. So, *of course* it's possible to run
JavaScript server-side on IIS - I do not write *anything* in

If they don't believe you, download the entire site[1] and
let them inspect it!




"Is there any mean to get the first - day of the week - date
and the week number?"


All the objects and their methods are well documented on MSDN,
here are the Date object docs:


            H A V E   I   H E L P E D   Y O U ?

          If I've helped you, help me help others!


         ===> now with new ways to say thanks! <===

Please, join our aspcya list, especially if you're experienced
with the CoverYourASP site and code and would like to share
answering the questions. I will remove moderation from users
who I already know when they first post to the list, and any
others that show they won't stray off-topic. Your replies
will then go straight through without any delay.

In the meantime, while you're moderated, please bear with me
as your emails will be delayed until I approve them to the
list. It's all done this way to keep the quality of the list
high, which obviously benefits everyone.

Thanks Guys! Speak to you later.

Warmest Regards,

James Shaw

[email protected]

885 Woodstock Road, Suite 430, #108
Roswell, GA 30075-2247, U.S.A.


                S U B S C R I P T I O N S

          Do you want to subscribe or unsubscribe?


Featured sponsor
My favorite resources

CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?

New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!

See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!

I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!