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
37 active users
2810 visitors today
2082 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

Mar 10 2001


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

             Welcome to the latest newsletter!


When did I become an "established" ASP site? Don't know when
it happened but it's kinda cool when sites bigger than mine
ask for reciprocal links!

Charles Carroll gave the site top billing in an article this
week too. In it he discusses whether sites should be free to
access or charge for content.

All I can say is that it's lucky that I changed my mind about
making some articles available only to Silver members - or I
might have been on the bad guys list!



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


Download The VisualASP Component Pack v3.1 and start
creating fast, lightweight web applications using ASP
technology. Try the new TabView Component plus updated
TreeView, ListView and MonthView Components. The Component
Pack now contains an easy to install (local) examples site
showing demonstrations and ASP Script source for each

                  Download Version 3.1 Now.



                    T H E   D I A R Y

               The events of the last week



4 Mar

- Since my site grew wider recently the ASPWire news section
at the bottom of this page looked a bit odd, so I improved
it this morning. Take a look, it's now two columns. You can
see the updated source code for the MFC application that
gets me this news feed in my article.

- Other minor improvements - I s t r e t c h e d out the
footer onto one line, so it filled the available space


5 Mar

- Many questions that I get asked are answered on the site,
if only you could find the correct page! To help me answer
these questions, and to promote my Search tool, I've added
a few lines into utils/Search.asp.

Even though normally form-driven I can now pass in the
search expression in the URL - this allows me to email
people a link to the search results.

For example, going to:

will act just as though you'd typed that into the search
form. All I had to was add these lines:

   // get data from querystring
   var sSearch = unescape ( '' + Request.QueryString );

   // get data from form
   if ( !sSearch.length )
      sSearch = '' + Request.Form ( 'SearchText' );

   if ( sSearch != 'undefined' )
      //show search results


6 Mar

- Apologies to any AOL users out there. I've just
discovered (actually my wife did, and moaned at me) that
my shared mail server has been blacklisted because of some
rogue usage. Which is why so many AOL newsletters bounced
at the weekend. Hopefully it will be resolved within the
next 24 hours.


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


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
20 of the most popular ASP, SQL, VB and XML Usenet newsgroups.

Devdex indexes over 5,000 new resources everyday including
those from MSDN, ASP.NET, 15seconds, 4guysfromrolla,
ASPToday, XML and just to name a few.

If it's on the NET it's on Devdex!



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

        Please recommend my site to your colleagues


One new article this week, but it's a small one. Someone with
a grudge had been harassing an individual by signing him up
for newsletters all over the internet - mine was one of them.

To cut a long story short, I now have a "Blocked email" list
that the site won't send email to. Instead it emails me the
IP address, user agent, time etc so the user can be tracked

"Fighting email abuse"


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

Get FREE sample code, online utilities, and articles at

Add intelligence to your ASP applications! Look up Whois
records, check email addresses, do DNS lookups, find network
problems with Ping and Traceroute, and more.


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

Jeff M gets the honors this week for sending me some code for
an improved FormatCurrency function. You can see it in the
feedback section below.

Sending in the code initially was nice, but Jeff gets
special mention for sending in bug fix #1, followed by
improvement #2 and bug fix #3!

Thanks Jeff.


               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.


I added a new site to the "Mini Me" page this week - True
North Music is another site based on my code.

Brad Moore was the author.

"I have created a new web site based on some of your code.  
I converted what I needed over to VB and integrated it with
some shopping cart code to build my site.

It's my first attempt at something like this, but it's been
quite an experience. Your site was invaluable!"

Check it out:


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


Powerful Code Generation tool for Professionals and Beginners
- develop database-driven web applications in matters of
hours. Developing anything from Grids & Forms to Portals and
Intranet just became easier. CodeCharge generates ASP, JSP,
PHP, Perl, CFML and comes with examples of Online Store, Bug
Tracking System, Task Management System, etc.



                     F E E D B A C K

            Have something to say? Please share!



Michael Webb:

"Hi James,how can I change the banners when I download your
site? I've deleted the entries in the database, but that
doesn't make any difference!"


All banners are served from Application variables for speed.
Go to resetbanners.asp?secret=1 to reset them to what is in
the database.



SeungYong Kim:

"I've tried to make the CoverYourASP work by following your
instruction and advice given in troubleshooting.

However, I still have one weird problem. When I type in
http://mycomputername/cya/, I got the initial page as shown
on your site.

However, when I click one of the links shown in the page, I
got an error message, "The Page Cannot Be Found". For
example, I got the same error message when I clicked the
link "Getting started - what is ASP?!".

However, if I corrected the URL
the browser loaded up the corresponding page."


The answer is in include/config.asp - it'll probably all
work if you use http://localhost/cya instead of
http://mycomputername/cya to access your site.

For reasons why, read

(Incidentally, "base href" is the second most popular search
expression used in search engines when finding my site,
after "personal web server")


David Berry:

"First let me say what an outstanding site this is (yes, I
cast my vote <g>).  I've found a lot of great information
here.  I've downloaded your full site and have been looking
through the code but one thing has me puzzled.

I see what you're doing in the global.asa for setting
BrandNewDay() and where RemindMembers() is called but it
appears that for any of this to "kick off" someone has to
open default.asp (or another page) each day.  

Is that correct? What if no one opens the site for a few
days?  Would I need to use something like a scheduler
program on the server to do this?"


You're absolutely right of course, but I would hope that
someone opens a page on your site within a few minutes of
midnight each day, or you're doing something wrong!

My site has very little traffic in the grand scheme of
things (300,000 pages/month), but there is always a new
page request within a minute of midnight each day. Even at
the weekend a new page is requested every 17 seconds
(on average).

If your site is really new and traffic really doesn't
cover this, schedule your own computer to open a page on
your website at 12:01 - then at least you can disable this
when traffic allows!

I still have my GetNews MFC app running in my PC's Windows
Scheduler to get the news twice a day - I always wanted
my readers to be able to set up CYA code without anything
but FTP server access.


Jeff M:

"Its about time, I find a site on jScript! :-)
ASP on the web is almost all VBScript. :-(

Just wanted to make a suggestion on the formatCurrency,

<%@ language="jScript" %>
function formatCurrency(amt)
     temp = amt.toString().replace(/\$/,'');

     temp = Math.round(temp*100);

          return '$'+temp.toString().replace(/(\d{2}$)/,'.$1');
     else if (temp>0)
          return (temp%10)?'$'+(temp/100):'$'+(temp/100)+'0';
          return '$0.00';

money = new Array(.005,.05,.5,5,50,'$.528','$5.582',.008,10,.1,.4,.05)

for (i=0;i<money.length;i++)
     Response.Write('OLD = '+money[i]+'<BR>');
     Response.Write('NEW = '+formatCurrency(money[i])+'<BR><BR>');

It covers all the bases too! It will accept numbers, strings
(will ignore strings unless already a dollar amt - $7.87)
and the divide by 100 even adds a leading zero (when
applicable & on my machine with jScript 5.5)"


Thanks Jeff! I haven't tested any of this, but I have it in
my growing list of things to improve on the site. In the
meantime I put it here for everyone else to take advantage


Jonathan Lahijani:

"I was taking a look at your mailtolist.asp file to see how
you went about sending your newsletter to your subscribers.
There was one line which I was unsure about:

// set the timeout to 15 minutes
Server.ScriptTimeout = 900;

What does this exactly do?

Just curious... how reliable is your script when it comes
to sending out newsletters?  Can it handle the volume of
emails you send?"


Increasing the timeout stops the script being aborted by
IIS who otherwise would think it had hung up. Sending the
1200 emails through the script takes about 2 minutes.

The script is very reliable, as long as you *never* re-submit
it, no matter how long it seems to take! In the early days
I would get impatient and people ended up getting 3
newsletters. Just hit submit and walk away.

I use ASPMail which can cope with an order of magnitude
more emails than I send!



[talking about last weeks reference to the problems I
was having re-using aliases in a SELECT statement]

"That sort of statement doesn't really make sense from a
set based point of view.

You'll have to create the result set like this:

SELECT a AS b, a+1 AS c
FROM ...

but there are always more ways to solve a problem and it
depends on the query you're using...

Check out this link for a detailed explanataion:


That article has certainly opened my eyes. I strongly
recommend that *everyone* reads that. Being a C guy I had
definately "assumed" SQL worked differently, and this
article has really taught me a lot. It makes perfect sense
now why my aliases don't work!


David Berry:

"I'm using your functions for showing the number of users
on-line, pages viewed etc.  It all works but it appears
that my ISP re-boots the servers often since the numbers
are high at one point then down then back up.  They also
don't match the server logs.  Is there a way to:

1. Maintain the original count and start counting from
there when the server goes back up?
2. Count how many times the server has rebooted and display
that number?

Thanks.  I'm learning a lot from your site."


All you could do is increment a count stored in your
database, rather than simply increment the application
variables like I do.

That's easy to do - I do it already for keeping a count of
how many times each article has been read.


Similarly, in global.asa's Application_OnStart function,
increment another counter in the database that will show
you how many times the server has restarted, and read the
database to get the initial values for your page counter.


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


IP*Works! V4 ASP Edition includes 30 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.



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

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


The "for sale" sign is standing proud in the front yard, so
some serious spring cleaning is on the cards for this

I have a hunch that the most work I'll be doing on the site
will be writing this newsletter for a few weeks. Sorry!

Thanks Guys! Speak to you next week.

Warmest Regards,

James Shaw

[email protected]

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


   V O T E   F O R   Y O U R   F A V O R I T E   S I T E

         (or don't, if it's not

                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?

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...

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

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

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!

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!