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
211 active users
4174 visitors today
3537 pages today
how is this done?
Tools I use

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

ASP.NET Blog
RSS submissions
E-commerce

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

undefined NaN NaN


John Raff:

I'm using Access 2000 and get this error:

Microsoft OLE DB Provider for ODBC Drivers error ‘80040e14’
[Microsoft][ODBC Microsoft Access Driver]
Invalid bracketing of name ‘[SSI.asp]’.
/CYA/utils/Footer.asp, line 94

which is the line:

UPDATE Articles SET Hits=Hits+1 WHERE URL=”SSI.asp”;

Me:

MSDN just talks about brackets, when there aren't any in this
SQL!

I'm using Access2000, as are many others, so why are you
getting this problem and no-one else? Another puzzle.

Does changing the line to this help:?

oConnection.Execute( 'UPDATE Articles SET Hits=Hits+1 WHERE
URL=\'' + sIncArticlePage + '\'' );

(Unfortunately, my reply got bounced, so John if you're
listening, I want to help - and put the answer on my site!)

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

I can't go a whole newsletter without asking you to get your
newspaper delivery boy, the milkman and the UPS Guy to vote
for my site - I'll only ask every week for another 3 months,
I promise...

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171


Speak to you next week.


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?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

With over 70 files modified this week on the site, nobody
can say the site isn't dynamic! The site seems to be
"accelerating" if that's the right word.

Hopefully you're enjoying watching the site grow too - it
reminds me of the science experiment where you grow a
crystal.

I never know which articles are going to be popular or
generate feedback. You almost have to be a psychiatrist to
build a web site.

So, lie down on the couch and I'll take you on a whirlwind
tour of the weeks events...

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

13 Jan
______

- Started adding some links to external resources on the
Trouble shooting page. If I can't help you, someone here
can...
http://CoverYourASP.com/Trouble.asp

______

14 Jan
______

- Added a few enhancements for my advertisers - Banners by
day now include totals, and a link to the page is now
available on Member Services for advertisers to click on.
http://CoverYourASP.com/BannerReports.asp

______

15 Jan
______

- Code Updated: Improved Handle500100.asp - it now appends
the Referrer, IP address and User agent (browser) to the
email that it sends me.
http://CoverYourASP.com/ShowSource.asp?page=Handle500100

- Code Updated: Fixed some HTTP 500.100 ASP errors that got
reported when readers were playing around seeing what they
could break! Calling BannerCounter.asp and CountLosses.asp
directly is a lot less likely to generate errors now!

- Code Updated: Missed a vital step when I was re-organizing
the BrandNewDay( ) function in utils/Init.asp recently. The
GetDaysBanners( ) function wasn't being called, so I fixed
that this morning.

______

16 Jan
______

- FYI - Mails sent to home.com have been bouncing since
Saturday, so if you're missing your newsletter, or can't
subscribe or join as a member, now you know why. Many email
discussions lists are discussing the problem, but it's
definately home.com's problem...

- Passed 500,000 page views today. Thanks for your continued
support - have you told all your friends? Got all your
co-workers to vote?

______

18 Jan
______

- Mike Robinson wrote in about a "Permission denied" when
sending email with CDONTS. I've now documented that problem
in a new "Email" section of the Trouble shooting page.
http://CoverYourASP.com/Trouble.asp

- Many people want Personal Web Server, but don't have the
Windows 98 CD. I've now updated the PWS article to include
links to download PWS from microsoft.com.
http://CoverYourASP.com/PWS.asp

______

19 Jan
______

- I moved the IncrementArticleCounter( ) function from
utils/footer.asp to utils/init.asp today. Many people are
clicking through to other pages before all the images have
loaded, so the article counts were lower than they should be.

- Fixed an error in CategoryPage.asp caused by my earlier
upload - I just love my HTTP 500 handler!

- While looking at some search engine referrals today I
noticed something a little disturbing! There were a few
CoverYourASP web sites out there - not just mine!

Downloaded copies have been put on the internet and found
and indexed by search engines!

So I've "enhanced" the legal statements to make it clear what
the intention of this web site is! Also, the downloaded
version has a banner highlighting the change..
http://CoverYourASP.com/Legal.asp

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


Two new articles this week:

"Automatically reminding and deleting unconfirmed members"

Another example of using the BrandNewDay( ) function - this
time to search the database for unconfirmed members, and
email them or delete them...

http://CoverYourASP.com/MemberAdmin.asp

"Generic function to walk through your sub-folders and files"

Developed to index my pages for a search function, this
article describes a function you can use for whatever you
want! Also discusses recursion and passing functions as
parameters.

http://CoverYourASP.com/WalkFolders.asp


And another updated:

"Limiting clickthroughs to one per IP address per day"

One of the requirements from the banner ad system was to
protect the clients from spiders and malicious users...and
HTTP HEAD requests...and...

http://CoverYourASP.com/LimitIP.asp

____________________________________________________________

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


Mark Briscoe gets the honor - he has been very helpful
recently and made some excellent suggestions for
improvements - some of which I've even implemented ;-)

Thanks Mark. Keep them coming!

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________
____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
13 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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Frank Fattizzi:

I was checking out how you are storing the footer views in a
database with relevant info. I noticed that this does not
track Netscape 6 views.

Me:

(well actually, I couldn't think of any reason why this would
fail, and Frank found the answer before I'd tried to
reproduce the problem)

Request.ServerVariables("HTTP_USER_AGENT") returns a string
82 characters in length for NN6, and the Agent field in the
Stats table was only 80 characters long. The insert statement
was failing and because it was called from a img tag I didn't
receive an error. Increased the size of the field to 85 and
all is well.

______


John Sorensen:

How can you change the values of an application variable, or
an application function? When I change the Application
Functions/Variables in the global.asa file, the changes don't
take effect until I reboot the server?

Me:

Obviously PWS is different (I didn't realize this), but the
IIS that your ISP uses doesn't work that way. Whenever
global.asa changes, i.e. you upload a new one, IIS sees this
and will automatically call the Application_OnStart
function.

Now, I'm not sure how much of a "restart" actually happens,
but I do know that you can upload a new file, and it gets
used immediately (presumably at the start of the next
session). Not to be taken lightly though, since all your
Application variables get wiped out!

______


Lee Wilson:

Once the user has logged in I want a field in the members
table of the database to be set, so I can list the members
that are online. How?

Me:

Put the following line into ValidateLogin( ) in
utils/login.asp:

oConnection.Execute('UPDATE Members SET FieldName=True
WHERE MemberID=' + nMemberID );

and set to False in Session_OnEnd ( ) in global.asa to
reset the field.

______


Mark Briscoe:

I was looking at your main page, where it pulls the most
viewed pages out of the database and places them in order.
I have noticed this before, that the date in the DB is
just a date value. Could you use the the file data stamp
instead?

Oh yer, i also thought that you could do a search page,
which would search all your articles, that would be cool.

Me:

It would be easy to do with the FileSystemObject, but I
decided against it. When I re-word a section, fix a typo
or just upload by mistake I don't want the article to be
flagged as "updated", and I doubt readers would either.
I rarely update the date, but if an article is added to,
or the content significantly updated I have that option.

As for the Search capabiliuty, I am writing it right now!

______


Mark Murphy:

I have two questions about your approach and would like to
hear your comments.

When you are using your SSI's on a new page in which the
Content() function will contain some particular formatting,
do you find it necessary to first design the page with a
wysiwyg editor like FrontPage and then to translate the
result into Out() statements?

When debugging output html it would be nice to have it
formated with some logically placed crlf's so that when
using View/Source, it's a bit easier to read.  Is there an
easy way to do that with JScript in the Out() function
perhaps? Do you think the performance change warrants just
having the crlf's in for debug only?

Me:

Good questions!

My pages are very simple - the same header, footer with just
different text in between. Some tables/forms I guess. Anyway,
no, I never use any tool. Just start typing. My HTML is so
simple, it doesn't warrant it. But isn't most HTML?

Maybe I don't ever design pages that are complicated, but if
I've never needed to, then maybe it's not necessary. I almost
put a "viewable in any browser" button on my site once until
I ran it in Notscape.

<soapbox>
About the debugging part - it's really not just the cr/lf
that you'd need - it's the indenting, and that's the killer.
That's what bugs me so much - look at 90% of the web pages
out there, asp generated or not, and they all have huge
amounts of whitespace.

The customer asks for a quick site (or they should if they
don't), and what do they get? HTML comments - how ridiculous
is that in an asp page? Have you seen a frontpage generated
page that has db access? It's full of HTML comments containing
"webbots" to make its editing life easier. Screw the clients.
</soapbox>

Phew. Sorry about that. ;-)

Anyway, it would be easy to add a

If ( IsDebug ( ) )
{
}

to Out ( ) and do something different. But I'll never agree
to it being changed for published pages!

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________


I haven't mentioned the folks that publish links to my
articles around the web before, and without them you probably
wouldn't have found me.

So thanks are due to the following web sites, in alphabetical
order:

http://AllArticles.com        http://desASP.com
http://ASPcode.com            http://www.DeveloperSites.com
http://ASPdex.com             http://FindTutorials.com
http://ASP-focus.com          http://hotscripts.com
http://aspGuys.com            http://tcp-ip.com
http://Aspin.com              http://TutorialFind.com
http://ASPObjects.com         http://VisualBuilder.com
http://ASPWire.com

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

A lot of downtime all around this week! Some voluntary and
some not so voluntary - I'm just glad that I wasn't alone.

Spookily I even found a problem on Friday with my DNS setup
that is still unresolved - but at least I have a secondary
DNS that is still working. ;-)

Apparently it's been broken since November, so I'm not going
to panic. Register.com don't *seem* to have updated the IP
address of my primary DNS that was changed over 2 months
ago..

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

21 Jan
______

- Added a little exception handling to utils/database.asp.
This is just the start of putting using real error handling,
and was just hacked in this morning in response to the
security issue I found. I'll document it when my heart rate
returns to normal...

- Had to take the site offline for a few minutes this morning,
then the T lines went down for 4 hours...Sorry! The problem
was upstream, not with my ISP.

______

22 Jan
______

- It took me a long time, but I finally found out why "once a
day" scripts were sometimes happening more than once a day!
My Banner reports page refreshed the Application variables
containing the banners whenever clicks were moved between
banners by an advertiser. How? By setting
Application('BrandNewDay')=1 !! (see LimitIP.asp for an
explanation). It is now fixed...

http://CoverYourASP.com/LimitIP.asp

______

23 Jan
______

- Hakan Eskici just pointed out a potential problem with the
code that ignores IP addresses. It was "possible" to ignore
an IP address that shouldn't have been. Note that advertisers
would have got more free clicks, not less, so no-one's
complained...;-)

- Added a new page to the trouble shooting section to help
you fix problems installing Personal Web Server.

http://CoverYourASP.com/Trouble.asp

- I succumbed to reason last night and added the Opera browser
to the list of "supported" browsers to my clickthrough
system. To make it easier to share the code I added a new SSI,
called Browser.asp which contains a new function
IsKnownBrowser( ).

______

24 Jan
______

- I enhanced (my still undocumented) exception handling in
utils/Database.asp a lot tonight. Now you get much more help
when you get ADO errors when first setting up the site on your
computer. And if the real site ever gets an exception when
connecting to the database I get sent an email. I will write
an article on exception handling this week.

- Fed up with receiving emails from my HTTP 500 error handler
when people load my Server Side Includes directly, I modified
Handle500100.asp to only send email if the page in error is
in the root folder.

______

25 Jan
______

- Touched over 70 files again today - improved the breadcrumbs
on the multi-page articles so that you could jump to the start
of the article, and found an amazing HTML error - I use &#0149
all over the site for my bulleted lists, but it should be
&#0149; (note the semi-colon) oops!

- If you're getting the message "'oRecordSet.EOF' is not an
object" please download the source again - the error reporting
has been much improved!

http://CoverYourASP.com/DownloadCYA.asp

- Quick Tip: Don't trust anyone that quotes how many "hits"
their site gets! My recently enabled WebTrends log analyser
shows me for the first time this statistic and it looks very
impressive to the uninitiated - I'm getting 2 million hits per
month at the moment! Hits are requests for any file on your
server - SSI, images, even the robots.txt file!

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


Two new articles this week:


"Using exception handling to trap database connection errors"

To make setting up my downloaded site on your computer easier
I use exception handling to trap any errors that occur when
connecting to the database...

http://CoverYourASP.com/DBException.asp

"Please help me design my new search facility - take the survey!"

There are three proposals on how I will add searching to my
web site - which one would you prefer?

http://CoverYourASP.com/SearchSurvey.asp


And one updated article:

Over the last month I've been moving away from displaying
pages and pages of source code without documentation. All
my latest articles are heavily documented "snippets" of code
rather than the old "here's the contents of the file".

Now I'm going back through the old pages (I can't call them
articles) and revising them. The first to be revised is the
page that discusses my Server Side Includes. Rather than
displaying the contents of 12 rather large files I now give
an overview of SSI, then describe each one individually.

To try and be helpful I have cross-referenced the relevant
articles to each SSI, so you know where to read more.

Worth a re-visit.

http://CoverYourASP.com/SSI.asp


____________________________________________________________

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


Jon Gilkison takes the honor this week.

Jon sent in the following email - definately above and
beyond...

"I love your site [always a good way to start an email!],
it's great to see someone doing ASP in javascript.

Your database.asp file is great, I added some functionality
to it that you might enjoy:

Added a DBRowCount() function to return the number of rows
in a result.

Took your functions and wrapped them up in a javascript
class:

     db = new dbConnect ( );
     records = db.query( "SELECT * FROM someplace" );
     db.execute ( "UPDATE..." );
     db.close ( );

Also, added two unique functions, converting a record set
into an array of javascript objects and a function to
convert a recordset into XML text.

Again, thanks for the great resource!"

Thanks Jon. Integrating this and continuing with the theme
is on my list of things to do, but I promised a search and
a few other things first!

For those of you that want to see Jon's efforts you can view
it here: http://CoverYourASP.com/DBClasses.txt

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Added to my collection of domains this week. Can't resist!

I have been reading "The 22 Immutable Laws of Marketing"
and was thinking about Law#2, the law of the category. If
you can't be first in a category, create a new one.

Since I'm the only ASP site to offer itself up completely
for download I thought that could be my category.

As an extension of that I looked for domains, and my second
choice was available so I snapped it up. I am now the proud
owner of http://DownloadASP.NET - currently pointed at
the CYA site.

DownloadASP.com is not being used, but it's already
registered by NetZero of all people!

So, in a couple of years, when "Classic ASP" is just a quaint
memory and ASP.NET is the technology of choice I'll have
CoverYourASP.NET and DownloadASP.NET to serve you with!

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
13 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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


I usually have to filter the feedback and pick out the
choicest topics, but not this week. When I went into my
Feedback folder where I put interesting emails of the week
the cupboard was almost bare!


Instead, I'll mention a pleasant email I received from Eddy
at webbuilder101.com - CoverYourASP is this weeks site of
the week.

Go check out my interview!

http://webbuilder101.com/

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

By the way, it's my birthday today - 37 years young and
feeling more like 67 when I see all those 24 year old
billionaires writing revolutionary web apps!

I'm pacing myself, that's what it is. "Millionaire by 40"
sounded so much more feasible when I was 25...

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.

____________________________________________________________

P.S. Thanks for keeping me at the top for the whole of the
first month of voting - only 10 more weeks to go!
____________________________________________________________

   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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I have been pleasantly surprised to see sites springing up
based on my code. I won't mention the sites by name, yet,
but I'd like to start compiling an online list of them on
the site.

They are very impressive web sites in their own right - but
I can recognise parts of forms, or odd words here and there!

Of course, these guys have my full support. As my Legal page
attempts to make clear, these sites are using my code
exactly how I intended.

If any of these guys are listening, I'd love to give them
some free publicity, so please contact me:

"tractor guy", "biz guy", "connect guy", "education guy" and
"south pacific guy"...

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

27 Jan
______

- Apologies to the newsletter subscribers - I got two copies
this morning, so I assume you did too! Since I only sent it
once this time, I'll have to do some investigation...

______

29 Jan
______

- Just so that you know, I'm busy reviewing every page of
every article on the site and typing in keywords for the
search functionality due out by the end of the week. I may
still implement the HTML search too (see my survey), but
the keywords will come first. And, I want you to know that
it's hard work...;-)

______

30 Jan
______

- I improved the DBEditTable.asp page today - just two small
changes, but they make a lot of difference! First, You can
now sort the table by any field by clicking on the field
name. Clicking again will toggle between ascending and
descending. The second change was just to wrap the code
with a try...catch to trap errors caused by the query.

______

31 Jan
______

- Seems quiet this week, but I've been beavering away behind
the scenes! Tonight I will finish the manual indexing of all
the keywords in my articles, and tomorrow you will finally
be able to search the site!

______

1 Feb
______

- A few of you have noticed that you cannot sort the
BannerStats table by the BannerID field. That's because I
use an INNER JOIN to another table with that field also, so
my generic ORDER BY generates an error: "The specified field
'BannerID' could refer to more than one table listed in the
FROM clause of your SQL statement". Since this error is only
caused by the way I hide the real content of that table, I
now simply ignore your request to sort by that field.

- Here's a question - why are 6 out of the 20 prospective
members (those that haven't yet confirmed their membership)
using rediffmail.com email addresses? Is it coincidence?
Certainly it is a domain where the majority of people ask to
sign up, then 10 days later the account gets automatically
deleted...

- Search away! - an article on how I implemented the keyword
search is coming soon...the source code is already in the
download though.

______

2 Feb
______

- Come on everybody, get voting! Click on my new catchy random
rotating incentives on the right. What I really need are some
cheerleaders up here...got any spare?


____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


Only one new article this week, but it was a doozy:

"Adding search capability to CoverYourASP"

See how a single Server Side Include containing a single
function is all you need..

http://CoverYourASP.com/SearchDescr.asp

More on search coming soon though...

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________


Thanks for welcoming aboard Neil from VisualASP.com, my
latest advertiser. Many of you have been visiting his site
since the banner went live on Thursday - so many that his
banner won't last long!

I seriously love his components. To be honest I hadn't
seen them before, but they are sooooooo cool.

I am amazed that they are all pure server-side components -
you can make your web site look like a Windows Application
without anything but HTML being sent to the client.

____________________________________________________________

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


Bob Spellmann takes the honor this week.

Bob has regularly sent in helpful tips and suggestions, all
explained in great detail and clarity.

Thanks Bob.

The only slightly odd thing I've noticed is that he's one of
the 3% of visitors that use that old Netscape thingy... ;-)

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________


I have to say a quick hi to a new subscriber before I forget.

They said later that they read the whole thing from top to
bottom, and it was "very nice".

So, this is a test.                                  Hi Mum.

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
13 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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Abdel:

Subject: Showsource.asp?page=contact

Message: "Hi James, As the subject of this message puts it,
I'm interested in the way you display some of your pages,
(also commonly used on web sites) using the URL stated as
the subject. Are u documenting this anywhere ?

Me:

I'm surprised to find that I don't!

You can pass parameters into a page using this syntax:
(by the way, this is how forms with an action of GET send
their data to the server)

    http://test.com/page.asp?a=1&b=2&c=hello.

Then use Request.QueryString ( 'a' ) to return 1, etc.

To "cast" them into numbers or strings use this syntax:

var sString = '' + Request.QueryString ( 'c' );
var nNumber = Request.QueryString ( 'a' ) - 0;

______


The Mad Hacker, aka Hakan Eskici, aka "TableEditor man":

"I've found a potential security flaw in.."

and

"I've tried something that all of us usually forget..."

Me:

Hakan, what would I do without you? I won't publish your
emails, or my responses until I've fixed the second one -
your email only came in after I'd started writing this
newsletter.

______


Ismed:

Hi James! I found error when ran your code on my NT4
wstation using the downloaded PWS from MS. The error
found as follows :

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/cya/utils/Email.asp, line 28

Invalid class string

What does it mean James?

Me:

It means that you don't have an entry in your registry
for the ProgID you used in the Server.CreateObject call.

In your case, the SMTP service isn't installed, so there
is no registered COM component called "CDONTS.NewMail".

Haven't got an NT4 box to hand, but look in Control Panel,
Add/Remove Programs for an SMTP entry.

______


Randy had a number of problems connecting to his database,
and many emails were exchanged. It turns out that his ISP
*insists* that everybody's databases are placed in the same
single folder on the server.

That makes it almost impossible to reference with a DSN-less
connection since it requires the path of the database. Why
"almost" impossible?

Normally you don't know, or want to know, the absolute path
of your web site on the server. Everything is relative to
the root of the site. The database in my download is in the
folder "DBPATH/DB.MDB".

That relative path is turned into the absolute path that the
connection needs by calling Server.MapPath( ).

The problem with Randy's ISP is that Server.MapPath won't
return an absolute path if the relative path is outside your
web site, i.e. you can't do this:

  sAbsPath = Server.MapPath ( '../../../JimsSite/DB.mdb' )

Remember, is an ISP insists on this scheme it's because he
wants to charge you for a DSN connection - most do, and make
his life easier, not yours.

Which means that you should visit http://EverPlanet.com/

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

Following the hassle that the latest advertiser went through
to send payment I shall be investigating accepting credit
cards and checks online next week.

Hopefully that'll go through ok, and you can see how all that
is implemented. And those of you that are lined up to send in
donations, but can't use PayPal, can use that instead. ;-)

I joke about it, but did you know only 6 people have ever
done so? Now that's an exclusive club to join!


One last thing - I'm still hanging on to the lead in the
ASP Guild competition (see below), but the traffic that "the
other site" gets is finally taking it's toll.

With them having almost exactly 10 times the page views in
January that I got, I'm still proud that we kept the lead
for the whole month.

I bet they didn't get emails from their readers saying they
had dynamic IP's and could vote every time they dialed up...


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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I'd like everyone to come to an agreement. Get together and
decide on a rota system to use so I get emails spread out
evenly, no more than 10 a day. ok?

Last week, I got no interesting emails to put in here, this
week I had so many that I haven't even had a chance to
answer them! If you're one of those, I apologize.

A lot of you have asked questions, and know how quickly I
try to respond, but it's getting harder!

I've put off adding a forum to the site, thinking that there
were plenty of places to ask questions elsewhere. There are
of course, but a forum would at least allow Hakan, who lives
on the site anyway, to share the task of answering the
questions. ;-)

How about this, for a start. If it's not CYA-related, join
the relevant list at http://asplists.com/ and ask there.

After all, that's what I do when you ask *hard* questions...

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

5 Feb
______

- All my work has been offline this week, but I did notice
something that made me laugh out loud...has no-one noticed
that I'd used length="20" in my forms to set the length of
the inputs? There's no such attribute - it should be
size="20"!! I only made the mistake once, then copy and
pasted it everywhere else...don't we all make silly
mistakes? ;-)

______

6 Feb
______

- Improved the Search.asp SSI - thanks to Hakan Eskici
again - reserved characters (like ' or %) are now stripped
from the search expression using the line below:

    sSearch = sSearch.replace ( /['"%]/g, '' );

- I've added a new flag to config.asp - bStoreStats - that
controls whether I store statistics about people visiting
the site.

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


Three new articles this week:

"Getting feedback emails from a <form>"

Walk step-by-step through the feedback form and email code,
with pages devoted to CDONTS, JMail and ASPMail...

From Email-related examples, published 9 Feb

http://CoverYourASP.com/ContactDescr.asp

______


"Implementing <form>'s with ASP"

Here I show you the ASP code common to all forms I write,
with discussions on validation and field persistance.

From HTML tips and tricks, published 9 Feb

http://CoverYourASP.com/Forms.asp

______


"Web sites based on CoverYourASP's code"

You realize by now that you can download the entire site,
right? See others that have gone before you...

From The CoverYourASP site, published 6 Feb

http://CoverYourASP.com/MiniMe.asp

____________________________________________________________

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

Last week I laid into an ISP's treatment of a reader when
they forced him into placing his database in a folder outside
his web site.

David Rahrer took the time to send in a very informed and
very polite response that immediately made him this weeks
Hero of the Week:

"I think you were a little quick in your judgement of Randy's
ISP for a couple of reasons.

1) While I have never heard of putting all databases in the
*same* folder on the server, we put them in a specific
"database" folder on the same level as the webroot for each
client web.  The client has FTP access to this folder and
the database is kept outside the relatively open environment
of the web server.  We actually encourage the use of DSN-less
connections, but would never allow the database to be left
in the web, and therefore Server.MapPath( ) has to be
replaced with a hard path.  I think it is inconvenient if not
improper to leave this choice out of code.

2) Since the actual path to the webroot can easily be
established using the "PATH_TRANSLATED" server variable, it's
not really a big deal to disclose this to a user for their
convenience.

While some hosts may very well try to increase profits by
enforcing the use of system DSN's, there are much better
motives for moving the db out of the web server.  In any
case, I would be very suspect of a host that *allowed* the db
to be left in the web server.  IMHO, it isn't good practice
and leaves the client, not the host, at a disadvantage.  Of
course, it does depend some I suppose on how much you value
the security of the data being stored.  We deal with a lot of
e-commerce and there is obviously a need to be more careful,
but the policy is followed for everyone.

One other thing you might consider when using
Server.MapPath( ) is that some hosts also disable the use of
"parent paths", making it impossible to walk up the directory
structure (../).   I think this is actually still a security
check recommended by MS in IIS5.  Many don't do it because
it's a pain to deal with the issue when an app that has been
designed to depend on this won't work, but there are a few
that do.  Just FYI :-)

If you have anything that might add to or contradict any of
this, I would be very willing to listen.  Take care."

Unfortunately, David didn't give a hint what ISP he works for,
if any, so I can't promote them.  

Thanks David!

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________


Frank Wood was runner-up Hero this week. His first of many
emails this week started with a sentence that made me laugh:

"James, I appreciate that you are "giving back to the
programming community, but.. Hand Picked Words?  Are you
nuts or do you just have an enormous amount of time on your
hands?..."

Uhh, I don't have *any* time, so I guess I'm nuts.

Frank and I had a discussion about the best way to index
and search words automatically picked from the HTML of my
pages - even sending his list of "common words" to discard.

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
13 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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Rob:

"Just wondering if you knew that your test account is pretty
easy to guess. If you dont mind people accessing your test
tis ok

email: [email protected]
pass: test

I have a thing about security. B-}"

Me:

Thanks Rob, but that account is deliberately there for
people to play with!

______

Vanna Stockel:

"I have a personal web site and would like to display
current time in Sydney. Unfortunately my host server is in
USA. I'm using the Now() function

<%=now() + 0.583%>

Displays in the following format.

2/5/01 6:13:58 AM

The date and time are accurate. Is there any way, I can
display the date and time in a better format such as:

Monday, February 5, 2001 - 6:13:58 AM"

Me:

There's an example of better date formatting in
http://CoverYourASP.com/Date.asp

To add so many hours to a date, do this:

Var d = new Date ( );

d.setHours ( d.GetHours( ) + 9 ); // add 9 hours

______

Neeraj Billa:

"I have seen in most of the search programs that they
display "/abc_prodID_123.html" rather than the destination
URL.

I THINK what exectly happens is that they maintain a sort
of database containing ID and its values i.e. like if
ID=123 it will direct the hyperlink to
"http://www.microsoft.com". So there must be some place
where these ID and their respective values must be kept"

Me:

You need a redirect page that understands the id=123,
looks it up in a database, then redirects to the correct
URL. This works wherever the new page is, your site or
another.

You just need code like this in a file called
redirect.asp. I haven't even run this, so there may be a
typo or two - let me know!

<%@ Language=JavaScript  %>

<!--#include file = "/include/Config.html"-->
<!--#include file = "/utils/Database.html"-->

<%
var nID = Request.QueryString( 'ID' ) - 0;

DBInitConnection ( );
DBGetRecords ( 'SELECT URL FROM RedirectTable WHERE ID=' + nID );

var sURL = '/sorry.html';    // go to sorry page when id not found

if ( !oRecordSet.EOF )
     sURL = '' + oRecordSet ( 0 );

DBReleaseConnection ( );

Response.Redirect ( sURL );
%>

______


Lee Wilson:

"I am using your method of looping through all fields, and
showing all records which match a certain criteria. I was
wondering how I could use alternate text, ie "No records are
available to be displayed", if there are no records in the
record set. Someone was telling me that using BOF was a way,
but I am not sure."

Me:

Hi Lee, I use:

DBGetRecords( 'SELECT Field from SomeWhere' );

if ( oRecordSet.EOF )
{
     Out ( 'oops...' );
}
else
{
     while ( !oRecordSet.EOF )
     {
         // do something..
         oRecordSet.moveNext( );
     }
}

______


Chris Moon:

"Greetings from the UK!

Came across your site via a link from another resource
yesterday, and what I must say is "What a find".

I eagerly signed up for membership, registered for the
newsletter, and downloaded the source code for the site.

I was trying not to demonstrate my naivety in these matters,
and was hoping that through your excellently compiled
documentation, and extensive trouble shooting guides to have
solved my problem, but alas no.

Under normal circumstance I would perhaps have given up and
gone and washed the car or similar, but recognising the
potential that exists for me in resolving this issue (I'm on
a steep learning curve) I would appreciate a few words of
wisdom - I would like to think that in the not to distant
future I could be asking your permission to use the code in
a live site.

Here goes with the error messages I am confronted with when
the default page has loaded:

An error has occurred whilst connecting to the database:
   "Could not find installable ISAM."

I have altered (many times and combinations) the config file
to reflect my installed components. I am running on PWS under
WIn98 with MDAC Microsoft.Jet.OLEDB.4.0 installed."

Me:

Hi Chris, welcome aboard! You are the first to report this
error, so I looked it up on MSDN. Please have a look through
these, and if possible let me know which, if any, fixed the
problem. I can then update my troubleshooting page.

Good luck. It looks like a corrupt DLL or registry entry...be
careful!

http://support.microsoft.com/support/kb/articles/Q268/8/60.ASP
http://support.microsoft.com/support/kb/articles/Q209/8/05.ASP
http://support.microsoft.com/support/kb/articles/Q150/4/94.ASP
http://support.microsoft.com/support/kb/articles/Q155/6/66.ASP
  
______


Mike Darrah:

"I setup my PWS correctly, unzipping the files and pointing PWS
to them as I should. I am getting a JScript error now which I
am not certain how to correct.

Can you provide some assistance perhaps? :)"

Microsoft JScript compilation error '800a03ea'

Syntax error

D:\CYASP\CYA\INCLUDE\../utils/Database.asp, line 94

try
^

Me:

Hi Mike. You need to be using JScript v5 to use exception
handling. You can install it from the Microsoft Visual InterDev
6.0 CD or download from the Microsoft Scripting web site at
http://msdn.microsoft.com/scripting/.

______

Levous:

"I just wanted to offer a point for consideration.  Many of
your articles are biased towards performance and optimized
code over easily maintainable, extensible design.  There is
a tremendous trade-off.  When desiring to update the user
interface, an experienced programmer is required rather than
a graphics/usablilty expert.  This ties up programmer resources
who could be adding valuable functionality while the pictures
and page-flow are handled independantly.

On the other hand, a hybrid component that runs through the
source ASP pre-scripts it?  Start with converting HTML blocks
into script calls, then remove white space.  When that's
stable, scan for known performance bottle-necks, repeated
code, etc.  I bet large web-sites would dig that.  Especially
those with high-volume and slow load time...  It would
require a programmer with interest in high-performance ASP and
knowledge of more powerful compiled languages..."

Me:

I've had the same thoughts. But with ASP.NET coming soon,
there seems little point in it. "Classic ASP" will be used for
a few more years I'm quite sure, so this site has some life
left in it, but CoverYourASP.NET is definitely the future...

______

Jerry:

"I have a database with 2 tables. I would like to produce to
list boxes showing the existing data in the two boxes. With
buttons like 'Arrows' to select an item from one list and move
it to the other list. Then of course a button to delete records
in either list and then a save button which will update both
lists."

Me:

I haven't got any code to do that, but I guess you have two
options - mainly server-side or mainly client-side. Obviously
manipulating the list boxes on the client would be more
efficient, then submitting the data back to the server with
your save button. From what I've seen of DHTML, this is not
difficult, but obviously client-side scripts must be able to
run. You're limiting your site to newer browsers with
non-paranoid users only. Your choice.

Or, do it all server-side with the left/right buttons
submitting the change to the server, who then sends a new page.
Lots of roundtrips to the server, but guaranteed to work with
any form-enabled browser.

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

There are some really cool ideas coming to fruition in the
next few weeks. I'm not telling, not even a hint. Really.

But you guys and gals are going to *LOVE* it!

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I got approved to accept credit cards this week - quite
surprising since I have the credit rating of a 16 year old.

One thing to remember when moving countries like I did when
I moved to America 3 years ago, your credit rating doesn't
come too!

So, it'll be the subject of an upcoming article which should
be quite useful. To start with I'll use the forms on the
Authorize.Net server, but I'm planning to get my own
security certificate so you can see how to implement
everything in-house with full SSL security.

Should be fun!

____________________________________________________________

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

                  http://www.codecharge.com
____________________________________________________________


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.

              Visit http://www.codecharge.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

11 Feb
______

- As the site's popularity continues to accelerate, I passed
the 1,000 subscriber to the newsletter today. Thanks to
everyone for wanting to stay in touch!

______

13 Feb
______

- Last night I made a simple change that dramatically improved
the speed that my pages loaded. Should have thought of it
before really. The SiteMeter counter that I use was inside
the <table> that my page displays in, so browsers couldn't
render the table until the image was generated. Just by
moving it outside the table the whole page still appears
instantly even when SiteMeter are down. Changed utils/Footer.asp

- Remember to go out at lunch time or leave work early tonight.
I don't want to get blamed if you forget your valentines gift!
You can read my articles tomorrow... ;-)

______

14 Feb
______

- I've added another page in the troubleshooting section, this
time explaining what to do when you get a JScript compilation
error '800a03ea'...

- Thanks in part to 4GuysFromRolla, who kindly put me on their
front page yesterday, I had the best day ever. Over 12,000 page
views, with peaks of more than 1,000 an hour mid afternoon. All
on my ISP's cheapest shared hosting plan and an Access database!

______

15 Feb
______

- People have asked about the server the site runs on - it's a
dual Pentium III 600, 1 GB ram, Raid 5 10K rpm drives with 4MB
cache on each drive. Raid controller has 32MB cache. It runs
Windows 2000, IIS 5 and I share the server with 120 other sites.
It uses ASPMail for email and Access 2000 for database.

______

16 Feb
______

- Had a little re-design last night - I made the site 800 wide
rather than 640. Very, very few of you are using 640 resolution,
and I need the right column bigger for 130 pixel banners for my
advertisers! Hopefully everyone agrees this is a better use of
your screen though... please let me know if you see something
that doesn't "look right" now.


____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


Developersdex delivers the world's largest index for
Microsoft web technologies.  Search, post, and reply to over
13 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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


No new articles this week! I'm not sure where the week went.

Perhaps it was all that time spent searching for Valentines
presents! Sorry, but have you heard the English saying:

"It's like Number 10 buses. None come for an hour, then 3
come at once."

I don't even remember if "buses" means anything to Americans.
I have a sneaking suspicion that it might have another
meaning here!

____________________________________________________________

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


Scott Mitchell - the only one remaining from the original
4GuysFromRolla - is this weeks hero.

Scott did me a favor by linking to my PWS article from the
front page of the hugely popular 4GuysFromRolla.com web site
and traffic increased because of it.

It was a nice surprise because I hadn't asked for the link!

Thanks Scott.

You know how you imagine someone, then you see a picture of
them and it's completely different? Take a look at this, and
tell me you're not surprised!

Remember that this guy has created a *very* successful web
site: http://marketplace.devx.com/upload/excerpts/mitchell/

Suddenly I feel very old.

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Dano:

"DBEditTable erroneously shows null dates as 12/31/69 (which
is probably the minimum date) when calling FormatDateDMY
(or FormatDateDM). The following is a fix:

function FormatDateDMY ( dateSeed )
{
     var dt = '' + dateSeed;

     if ( -1 != dt.indexOf('undefined') ||
               -1 != dt.indexOf('null') )
          return '';

     var date = new Date ( dt );

     return '' + (date.getMonth() + 1) + '/' + date.getDate()
          + '/' + date.getFullYear();
}"

Me:

Thanks Dano!

______


Ken Reed sent me an interesting link this week. I've mentioned
before that my email client, Outlook, is very strict on what
attachments it allows me to open. For example, you can't send
me an Access mdb database. If you do, I'll see the paperclip
symbol, but won't be able to even save the attachment to disc!

I could find nowhere in Outlook or Control Panel to disable
this feature, so I have to keep asking people to send files
in zips.

Ken pointed me to a link that explains how to add or remove
file extensions to this "dangerous" list:

http://registry.winguides.com/display.php/793/

______


Liam Cassidy:

"My name is Liam, I just applied to join your site - it's
INCREDIBLE, and I am in awe!  Congratulations, and many
thanks for making it so wonderfully accessible to the public.

I have been asked to relaunch my site - I'm doing this using
ASP to deliver dynamic content from a database.

I'm using Macromedia DreamWeaver Ultradeveloper to create the
recordsets for connecting to the dbase.  Accessing the
database tables and migrating text into a web page is easy -
I can do that.  But UltraDev doesn't support binary images -
so cannot build recordsets capable of uploading or
downloading images to/from the database.

I hope you don't mind me asking you for advice - it's hard to
find anyone (or any material) that helps, and that DOESN'T
cost the  earth!  (I certainly can't afford the #500
consultation fee I was quoted by an "expert" last week!)

Of course, any help that you can give us would be greatly
appreciated - and we would be happy to link to your site from
a new site when it launches."

Me:

I think you may be going down the wrong track to look to store
images in the database. I'd strongly recommend storing the
images in a dedicated folder, and keeping the URL to the image
in the database. Your database will be much more efficient that
way.

______


Anon:

"The example that you have for implementing forms does not work.
You might want to recheck. There are numerous errors contained
with it."

Me:

What can I say? It *is* my code, in use many times a day at my
site. I can only assume that this person tried to copy/paste
into a new asp file which on their system probably uses VBScript
by default. If they're listening, I'd be interested in more
information!

______


Steve Moore:

"Have you written anything that automates Microsoft
Access database compactions? With ASP?"

Me:

Here are a few links to read. On second glance it looks
like it may be possible to do this to databases on your
web site!

http://support.microsoft.com/support/kb/articles/Q230/5/01.ASP  

http://support.microsoft.com/support/kb/articles/Q230/4/96.ASP
http://msdn.microsoft.com/library/psdk/dasdk/jolt29pv.htm

______


Bob:

"I really like your site.  I am trying to add a lastupdate
part to the site. It is based on your site. I keep getting
object not found when I am trying to do a document.lastModified.
How do you add that to the site?"

Me:

I'm assuming you're talking about the date the page was last
modified? If so, you can't use document - that's client-side.

Look at the online FileSystemObject documentation at
http://msdn.microsoft.com/scripting/jscript/doc/sgfsosample.htm

The File object has DateCreated, DataLastAccessed and
DateLastModified properties that should do what you want.

______

Abdel:

"Hi James, Just wondering how easy and quick it was for you
to re-design all your site's page? In which file is this
code stored?"

By the way, you may activate the link to educinternet.com
if you want (sites based on yours)"

Me:

To make the change to increase the width to 800 pixels it
took just a change to a single byte!

Go to utils/Header.asp - there's a line that used to say:

      var nCurrentWidth = 0;

It now says:

      var nCurrentWidth = 1;

Quite an easy change! Because I had to support resizing of
the tables on the client-side in my article at
http://coveryourasp.com/Wider.asp I have an array that
contains the screen widths to resize to. By changing the
line above I've just changed the default width to fit 800
rather than 640.

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

Have a nice long weekend break, I will!

For the first time I get Presidents Day off from my "day job",
there's a beautiful sunrise outside, and my kids are being
quiet. Just need an advertisers check in the mail, and it'll
be perfect!

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

Small incremental improvements this week (the best kind).

I just love the grey border to the site, and the new size,
and especially that advertisers have a new spot to advertise
in! Do americans say "advertizer" with a z?

It just doesn't look right to me I'm afraid, and I've
already called my page Advertising.asp, so I'm stuck with it!

Of course the bad news was that I lost the lead in the ASP
Guild contest, but don't feel bad - I knew it would happen
sometime!

Maybe my "secret weapon" will make the site popular enough
to get the lead back before it's all over? hehehehe.

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

17 Feb
______

- Please welcome a new sponsor: /n software.

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

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

http://www.nsoftware.com/

______

19 Feb
______

- The site membership just had a quick burst and sped past
1,000 - there are now more members than newsletter
subscribers! Wanna join in?

http://CoverYourASP.com/MemberEdit.asp

- I just reserved the second space down in the right column
for advertisers who prefer 125x125 or 130x110 sized banners.
Thanks to Shawn Jackson of ActionJackson.com who was the
first to take the space!

http://CoverYourASP.com/Advertise.asp

______

21 Feb
______

- I came across a cool idea offered by Amazon.com today, and
I couldn't resist adding it! I added this new rotating banner
so you can quickly and easily help support my site...

send a $1!

http://s1.amazon.com/exec/varzea/pay/TMXVAS3OE44G3

- An article about accepting credit cards is on it's way -
VisualASP just bought another advertising slot with my hidden
form. It worked! This is "grown-up" stuff...

http://CoverYourASP.com/CreditCards.asp

______

22 Feb
______

- Thanks to Al Margheim for pointing out that my site
didn't allow its text to be resized by the browser. I had
used the CSS "font-size: 11px" which always remained fixed.
Now I have changed it in utils/Init.asp to "font-size: 70%"
and you can now resize using View/Text Size...

______

23 Feb
______

- I added a new feature to my ShowAd() function in
utils/Banner.asp. This normally gets called to display the
next available banner, but I've now added the ability to
send in the name of a banner to display. This means that on
certain pages I can always show a relevant banner.

A good example is my new credit card article where you will
always see a banner for charge.com - my merchant account
provider.

http://www.charge.com/banners/clicks.php?id=char1206

- A sad day today! I finally relinquished my lead in the
ASP Guild's Top Site race. Just goes to show - size does
matter!

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


One new article this week:

"Accepting credit cards on your site - it's too easy!"

The hardest part is filling out the forms, but once you've
done that the "programming" part is child's play.

http://CoverYourASP.com/CreditCards.asp

____________________________________________________________

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

                  http://www.visualasp.com/
____________________________________________________________

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

                  Download Version 3.1 Now.

                  http://www.visualasp.com/
____________________________________________________________

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

William Murray takes the honors this week.

He has links to my site from http://mkcomputing.com/ and
http://solarisprep.com/ - the latter link is now #3 on my
list of best referrers!

Amazing for a site that has only been live since the
beginning of this month - that's right - the site went live
less than 4 weeks ago!

Thanks for the support William. Let's have a race to see who
can reach 1,000,000 page views a month first...

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Found an interesting fact from the server logs last night -
the site source code has been downloaded nearly 7,000 times
in the last month.

That seems like a lot of downloads to me. Now if everyone
that downloaded sent me a dollar with that new amazon
button...

  http://s1.amazon.com/exec/varzea/pay/TMXVAS3OE44G3

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Jonathan Lahijani:

In your memberedit.asp file, I was wondering how you were
about to use the response.redirect object even though you
have already written content to the browser using the
Header function.  When I try to do something similar, I
get the error:

  "The HTTP headers are already written to the client
  browser. Any HTTP header modifications must be made
  before writing page content."

Me:

Use Response.Buffer = true;

That way you get much faster code, and the ability to
redirect because nothing has really been sent yet, just
put in the buffer.

You can also call Response.Clear to empty the buffer,
Response.Flush to flush the buffer (send it out), or
Response.End to stop processing the script entirely.

______


Bruce Hakala:

I'm currently learning ASP coding and tryign to figure
out a way to not only add an delete entires into an
access db. That part your examples helped me with
greatly..now here's the question: Is there a way to import
the db that it creates into a program like Outlook to
simplify my newsletter process?

How do you do it, once people subscribe to you?

Me:

Forget outlook - that's client-side. You can send email
easily from an asp page -

http://CoverYourASP.com/ContactDescr.asp

For the newsletter I just put everyone on the bcc and send
a single email. Works like a charm!

http://CoverYourASP.com/MailToList.asp

______


Mikko:

Is this silver and gold membership for real and operational?
Your site rocks.

Me:

Yes and no! It works - you can be a silver or gold member.
The problem is that I've never got around to giving them any
more content.

I tried once but got such a bad response that I moved all
that content into the free areas!

______


Rustam:

I work in the University computer and there is a firewall
installed. So I can't install PWS, neither IIS. Could you
advise me how to run my ASP scripts then?

Hugs

Me:

Hugs? Never been sent a hug in an ASP question before!

A firewall doesn't stop you running PWS or IIS. They both
allow you to run your scripts locally, so you don't even
need a network or internet connection. Hence the firewall
is irrelevant.

But to answer your question though, you cannot run ASP
without one of these products.

______


Matt V:

I am posting news stories on an ASP page. What I want to
do is list only a few lines of the actual story and then
have some dots then a "read more" link at the end of the
story... Is there any way to limit the amount of text
WITHOUT cutting off words in mid stream?

I looked at your code, and I am totally confused. Can you
give any help or other resources to consult?

Me:

My code is exactly what you need. I'll explain it in
"pseudo-code":

var sSeparator = '';// empty separator first time through
var nLen = 0;

for (;;)
{
     var sWord = 'something';

     nLen += sSeperator.length;
     nLen += sWord.length;

     if ( nLen > 50 ) // or whatever length is the maximum
          break;

     // ok to output word
     Out ( sSep + sWord );

     // change separator to comma
     sSep = ',';
}

// output some dots
Out ( '...' );

______


Andrew Latham:

I am setting up an apache server on linux. there is a
new asp module and I wondered if you have used it. I am
learning php but tons of really cool custom code are in asp.

Me:

I've used ChiliASP on Apache, but it sounds like this is
something different. ChiliASP worked almost exactly the
same. I had to change maybe 10 lines of code.

Their implementation of CDONTS and ADO is nearly perfect.

______


Colin Creed:

Fantastic site - only discovered it a couple of days ago.

I was having the problem described in your page CDO1.ASP
(Permission Denied when sending a CDONTS email)
and found that in my case the correct permissions had been
granted to the Anonymous Internet User.

Today I resolved the problem thanks to an article I found
in the DevGuru KnowledgeBase.

I thought might like to add the information to your own
article. The content follows.

A100199: When Sending Email Through ASP You Get a
"Permission Denied" Error.

If you receive a "Permission Denied" error when sending
email from an ASP page using the CDONTS object, this is
probably because the Web application is being run in its
own process space.

When an application is run in its own process space it
does not have access to the IIS metabase, and this prevents
the sending of email. To correct this problem, either run
the application in-process, or add the IWAM_servername
account to the list of operators for the default SMTP
service in IIS.

Again, congratulations on a great site.

Me:

Thanks Colin. I think I'll need to investigate it myself
before posting that on my site - I don't think everyone
would know from that explanation how to even check if their
application was running in-process!

______


Al Margheim:

Thanks for changing the way your site sets the font size.
It's much easier on my eyes.

I really appreciate the way you took care of this so
quickly.  By contrast, the DEVX site, which has the same
problem, didn't bother to respond when I sent them an email
about it...even though I pay to access their Premier content.


Me:

Thanks again for pointing it out - one example of old code
that never got revisited!

______


Sunil:

I have been visiting your site often and found lot of
valuable content. I was looking around for a way of porting
all my html pages dynamically due to the ease of maintaining
the site.

Is there any way using asp where my pages could be generated
dynamically and displayed on the screen and i could
administer the pages by some admin form?

Me:

Have you considered opening the html file with
FileSystemObject and streaming it out, like I do with my
utils/ShowFile.asp?

I have used the same technique very successfully to
display different content on a site.

clicking on your nav bar could just recall the same page
with a different query string that contains the name of
the file to open and display in the middle.


____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

Spring is here, if not officially at least in spirit. I'm
off to my eldest daughter's school carnival this morning,
and to look at new houses this afternoon, so I'd better get
busy.

I'm going to start work on that "other" ASP site soon -
CoverYourASP.net - that .NET framework CD is burning a hole
in my pocket - and we've got a complete re-design of the
site coming next month (are you listening JT?!!) - and of
course the "secret weapon" I talk about.

But for now, it's breakfast time.

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

More sites appearing on the Internet based on CYA this week,
some good, some bad! I only added one to my list of good
examples shown on http://CoverYourASP.com/MiniMe.asp though.

Two of the others I came across were p*rn sites, and
particularly nasty ones at that. I can't describe the
feeling - people say any publicity is good publicity, but
I'm not convinced.

Needless to say, they made no attempt to change the
appearance in any way, like I ask, preferring to simply take
the entire site as-is, with a new logo at the top.

The only thing that cheered me up was when I thought that
I should leave a "back door" in the code. Just thinking of
the possibilities made me smile!

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

26 Feb
______

- In recent weeks I have been getting more and more returned
newsletters because the subscribers mail systems have been
detecting the script in my newsletter, and refusing to
deliver it to the subscriber.

Although this is a laudable idea, my newsletter is not HTML,
and no script will be run on your computers! Each of the
sysadmin's I have contacted agree, but say that the software
they use does not distinguish between executable scripts and
articles *about* script. Sorry!

______

27 Feb
______

- If you want an example of the power of SQL (the language,
not the database) take this example. I wanted to display an
approximation of the number of days left for an advertisers
banner if impression and click rates continued.

To do this I used this SQL:

SELECT
Round(([ClicksLeft]/[ClickRate]*100.0)*
       ([EndDate]-[StartDate])/TotalImpressions,0) AS DaysLeft
FROM BannerStats

Pretty cool, huh?


____________________________________________________________

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

                  http://www.visualasp.com/
____________________________________________________________

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

                  Download Version 3.1 Now.

                  http://www.visualasp.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________


No new articles this week. I have a new excuse - I've been
busy looking for a new house. Found one too, but nothing's
been finalized yet...

I have started compiling a list of changes that I'm having
to make in order to move the site over to SQL Server 2000.

I'm surprised how easy it was, but there were enough
problems to make it "interesting". And I'm not finished yet.


Change #1: change " to '

By default " is reserved for other purposes in SQL, so
I changed over to wrapping any string fields with '.
Here's a before and after:

      SELECT MemberID
      FROM Members
      WHERE Email="[email protected]"

becomes

      SELECT MemberID
      FROM Members
      WHERE Email='[email protected]'


Change #2: change # to '

SQL doesn't like dates wrapped in #, and prefers ', so:

      SELECT BannerDescr
      FROM BannerStats
      WHERE BannerDate>=#03/01/2001#

becomes

      SELECT BannerDescr
      FROM BannerStats
      WHERE BannerDate>='03/01/2001'


Change #3: Re-using aliases

This is the most complicated, and one I needed help to sort
out. I asked on the microsoft newsletter hosted at
Shawn Jackson's http://aspdex.com, and got a reply within
10 minutes!

Here's a simple example of what works in Access, but not in
SQL:

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

Using the AS clause, I'm creating an alias 'b'. This alias
is then used in a subsequent expression when creating 'c'.

This works perfectly in Access, but maybe it shouldn't! I've
been told that it shouldn't anyway, but there are probably
lots of "opinions" on this.

The answer is shown below. I had to stare at this for a few
moments before it made sense...

       SELECT V.b, V.b+1 AS C
       FROM ( SELECT a AS b FROM MyTable ) AS V

To show you why I gave a simple example, here is the query
I actually need to get working in SQL!...

       SELECT Banners.BannerDescr,
       Min(BannerDate) AS StartDate,
       Max(BannerDate) AS EndDate,
       Sum(ImpressionCount) AS TotalImpressions,
       Sum(ClickCount) AS TotalClicks,
       Banners.ClicksLeft,
       Round([TotalClicks]*100/[TotalImpressions],2) AS Rate,              

Round(([ClicksLeft]/[Rate]*100.0)*
            ([EndDate]-[StartDate])/TotalImpressions,0) AS DaysLeft
       FROM BannerStats
       INNER JOIN Banners ON BannerStats.BannerID = Banners.BannerID
       GROUP BY Banners.BannerDescr, Banners.ClicksLeft

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

More interesting facts from the server log department this
week - I found another hero lurking there!

Well, hardly lurking - http://tcp-ip.com/ sent me 18,000
pages worth of visitors in February alone!

To put that in context, the second best referrer sent 6,000,
aspin.com sent 4,500 and aspcode.com 2,500.

So you can see why it was an easy choice this week.

I asked them for some background info on who's behind this
incredibly successful site - I was surprised to learn that
it started as Bruce Knapton's personal collection of
bookmarks!

In his words: "it just sorta grew from there"

His wife, Sherie, now runs the show and copes with the 350
pieces of daily email (can you imagine that much?) - but
that's still not the best part.

Sherie runs this site 99.99% on her own, and she has a
full-time job working for Office Depot! As Bruce says:

"She has absolutely no computing background, just seat of
the pants learning. Hobbies include Marine Aquariums,
raising Carnivorous Plants, Quilting and riding her Honda
Gold Wing. The site is maintained in the morning and
evenings as time permits."

Kind of like my site, just a little bigger! (on last count
they had 7,500 listings..)

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________


I'm going to retire next month - I had 3 new $1 donations
this week using that new Amazon.com Honor System! It's
anonymous, so I can't thank you personally, but you know who
you are. Thanks.

Amazon takes a share so, I get $2.10. That's almost enough
for my favorite lunch - a 6" Parmesan Italian BMT sub at
SubWay. Who'll give me a cookie?


  http://s1.amazon.com/exec/varzea/pay/TMXVAS3OE44G3

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Rafael Archuleta and I swapped a few emails this week,
lamenting the poor support PayPal.com have offered for sites
that sell content, downloads or anything that can be accessed
from the web.

I confirmed to Rafael that there is no secure way to do this
with PayPal - they don't even show as the referrer when they
call the confirmation page after the transaction!

Rafael then went on to say:

"the 70% font size thing just doesn't work well for Macs...
I have to set the text zoom in IE5 to 200% to be able to
read the source code displayed on your page. You can probably
guess how ridiculously huge this makes the rest of the text.
Let me know if you would like any CSS to help with this
problem."

Me:

Of course, that would be cool! I don't have access to a Mac,
and basically no-one ever browses my site with anything but
IE4+ on a PC!

I've heard it before, but never seen it, but Mac text is
far smaller than PC text. It seems that I'll have to set it
to at least 95% when on a Mac.

______


Dan Streib:

"Thanks in advance...(And howdy neighbor, from Kennesaw.)

I am a  PHP pogrammer and now I am required (at work) to
create a site using IIS and ASP. Viewing your source code
today - and surprised to see the syntax SO DIFFERENT from
ASP and SO MUCH LIKE PHP. :)

Main Question:  Does using JavaScript vs VBscript have
downsides?  Are all built-in "ASP" capabilities available?
etc?

Me:

Yes, you can use either language as you wish - it's just
personal preference. More jobs in VBS though, if you care.
(my clients with small sites don't).

______


Michael Webb:

"great site, great downloads, just wnated to know: how can
I change the site content without hand-coding HTML?
Dreamweaver just goes (blank) and so does Frontpage!

Is there a program to do this sort of thing?"

Me:

Sorry, but I'm a handcode-only kind of guy!

See why at http://CoverYourASP.com/DontRender.asp

______


Carl:

"You mention that once payment has been taken on
Authorize.net's form they redirect back to a page on your
site.

Is this page configured when you set-up with charge.com or
hidden somewhere on their secure form? How do you detect
a user who doesn't complete the authorize.net form, or if
their transaction fails - do you get redirected to an
alternative page if you so wish?

Thanks for a useful and demystifying article!"

Me:

The reply page is configured on a setup page on their
site, but you can also override it with a hidden field
if necessary.

All the data is POST'ed to this page, and you can see whether
the transaction passed/failed in there. You can configure
a confirmation email to you and the customer too.

______

Sanjay Nayak:

"Dear James, I am trying to run an asp file from one server
(Win NT and IIS) and using FSO, create a file in a mapped
drive of another machine running NT (No IIS installed on this
machine).

The code is fine and works well on my own machine but gives a
'permission denied' error when I run it for a mapped drive.

There is no help in MSDN or on the web.

Me:

Sounds like you just dont have permission - the anon internet
user needs at least read permission to your mapped drive.

Sanjay:

"Thank you for replying so quickly, but yesterday evening I
finally managed to solve the problem. The solution is that
for any machine that you want to access, a user has to be
created on that machine, with username 'IUSR_machinename',
where machinename is the machine name of the web server.

I don't think I can explain it correctly so please refer to
these links and also share it with everyone on the mailing
list. This solution took me 3 days to find out using
Google.com and CodeHound.com and I hope somebody does not go
through the same process again.

The links are

How does FileSystemObject access files from a UNC \\share\?

http://www.aspfaq.com/faq/faqShow.asp?fid=55

Why do I get 'Permission Denied' errors with FileSystemObject?

http://www.aspfaq.com/faq/faqShow.asp?fid=147

Microsoft does have a mention about the solution but as
usual it is hidden in layers and layers of useless
information.

http://support.microsoft.com/support/kb/articles/Q197/9/64.ASP

There is also a small mention on ASPFAQS.com

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=23

Thank you once again for replying so soon. In times of
ASP-crisis, Microsoft is the worst place to turn to and
people like you sincerely replying, helps a lot."

______


Scott Watermasysk:

"A cool feature to add might be a dynamic bookmark. I think
when you bookmark a page you get the default/index page,
not the page you are currently viewing.

I don't know if anyone will get anything out of it, but it
could be cool.

Me:

Thanks for the feedback Scott! It does work that way already
- the page you're on gets bookmarked.

What is probably confusing (and needs changing) is that the
bookmark is always called "CoverYourASP!", not the current
page title. I'll fix that.

(Since replying I checked out Scott's site - it's not
finished, so I won't mention it yet - but thanks for the
excellent link from your site Scott! Let me know when you're
done and I'll give you a plug...)

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

Anyone want a sneak peek at the soon-to-arrive "fun-style"
CYA UI?

http://CoverYourASP.com/images/CYAlogo.jpg

You may not be able to tell how cool this is, but I will
once and for all put an end to the emails telling me to get
a professional looking site!

It's my site and it'll be FUN if I want it to be. ;-)


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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

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!

Read http://www.learnasp.com/charlescarroll/asptoday.asp

____________________________________________________________

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

                  http://www.visualasp.com/
____________________________________________________________

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

                  Download Version 3.1 Now.

                  http://www.visualasp.com/


____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

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.

http://CoverYourASP.com/GetNews.asp

- 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
better!

______

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:

http://CoverYourASP.com/Search.asp?Banner%20Application

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

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

"Fighting email abuse"

http://CoverYourASP.com/Abuse.asp

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F


____________________________________________________________

              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.

                  http://EverPlanet.com/
____________________________________________________________

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: http://CoverYourASP.com/MiniMe.asp

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

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!"

Me:

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

Read http://CoverYourASP.com/BannerApp.asp

______

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
  http://mycomputername/AboutASP.asp
to
  http://mycomputername/cya/AboutASP.asp
the browser loaded up the corresponding page."

Me:

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 http://CoverYourASP.com/BaseHref.asp

(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?"


Me:

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);

     if(temp>=100)
     {
          return '$'+temp.toString().replace(/(\d{2}$)/,'.$1');
     }
     else if (temp>0)
     {
          return (temp%10)?'$'+(temp/100):'$'+(temp/100)+'0';
     }
     else
     {
          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)"

Me:

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
of!

______


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?"

Me:

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!

______

"sxpowell":

[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:

http://www.intelligententerprise.com/010216/celko.shtml

Me:

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

Me:

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.

See http://CoverYourASP.com/Search.asp?article%20count

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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

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

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________
____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I don't know where you are, but here in Atlanta, Georgia
it was beautiful yesterday. I'm trying hard to start a
"tradition" that the normal trip to Subway each day is given
a day off on Friday, and instead we go to a local bar for a
beer and a sandwich.

Sitting outside on the deck in the sunshine with a beer is
hard to beat. Isn't it still officially Winter?

I just realized that CoverYourASP hasn't been around in a
summer before - I started last September. I hope I can
keep my concentration...

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

12 Mar
______

- I just added a cool tip of the day to my rotating banners
on the right. The tip is supplied by SitePoint - an excellent
resource for webmasters. You can always see it at the bottom
of my resources page...http://CoverYourASP.com/Resources.asp

______

13 Mar
______

- Today I'm celebrating 1,000,000 page views from over 200,000
visitors since the site opened 6 months and 4 days ago! I
think that's pretty cool. My goal, which sounds a little
unrealistic but I'm told isn't, is to grow to 1,000,000 page
views a month by my first year anniversary!

______

14 Mar
______

- I've just added a new user-agent to the list that are
redirected to my JustDownload.htm page. "WebFountain" hit my
site a few times this morning doing things that no human
would do, but I can find out nothing about it!

I've searched everywhere. In the end I just added it to the
sCrawlers array in the RedirectSpiders( ) function in
utils/Init.asp. If anyone can shed light on WebFountain
please let me know!

______

15 Mar
______

- It's nice when the "establishment" starts using your code -
Steven Smith at ASPAlliance (one of the oldest ASP sites
around) sent me a note about my anti-spider code that I use
to stop advertisers paying for spider clickthroughs.

He now uses it too!

______

16 Mar
______

- I don't know if I should be proud or embarrassed by this,
but the zip file that contains the entire site's source code
(download it here) is now over 500,000 bytes. I really need
to split it up into applications like banner system,
membership, database admin, etc. but remember this is all
done after work!

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

Two new articles this week:

"Read archived copies of my weekly newsletter"

All my newsletters since the site went live in September
2000 are here. The earlier ones are particularly sad... ;-)

http://CoverYourASP.com/Archives.asp

"Displaying HTML files from your ASP page"

Often I need to display the contents of a file on my server.
This article shows you what regular expressions to use to
successfully display HTML, including automatically making
any hyperlinks live...

http://CoverYourASP.com/ShowFileDescr.asp

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F


____________________________________________________________

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

For the first time ever, I'm inspired this week to honor a
previous hero-of-the-week again.

Hakan Eskici inspired my database administration application
by writing the VBScript TableEditor and making it open-source.

See it at http://www.2enetworx.com/dev/ if you haven't
already - many ask for VBS versions of my code, and here is
some (in a way, remember I copied *him*!).

The reason for being nominated again? He's been drafted, and
will join the Army for somewhere between 6 and 12 months!

I wish him all the best. I wonder how different it will be
when he returns to ASP? ;-)

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Rob Collyer deserves a special mention too this week. He has
sent some very nice source code to me, in VBScript, for me
to share with you guys and gals.

Of course, I need to convert it to JavaScript first!

The code consists of a set of utility functions to help with
getting data from the QueryString, Form and Cookie
collections and putting the answers into variables with the
same name.

As an example, the value in Request.Form ( 'hello' ) would
be automatically placed in a variable hello.

Setting the data is also covered. The data in any collection
can be passed to another page in form hidden inputs, or
saved in a cookie.

Check the code out - I've just stored it on my server for you
to pick up. I'll convert it and use it later - I already have
some ideas on improvements...

http://CoverYourASP.com/Examples/FormFunctions.asp.txt
http://CoverYourASP.com/Examples/FormFunctions2.asp.txt

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Fahad Hassan Khan:

"I am taking input from form and displaying it to the user
to confirm it and then puting the value in the database.
I am putting values in variables from textfield and then
putting that variables values which I have displayed before
for user confirmation into database. It is giving me an
error that "String cannot be zero.length" please send me
Solution for this it very nice of you - I am having this
problem form last 2 weeks!"

First form:

   <input type="text" name="textfield">

Second form:

   Response.Write ( Request.Form ("textfield") );

Third form:

   Request.Form ("textfield") is empty

Me:

Although the second form displayed the values, you didn't
pass them on to the last page - you needed to send them as
hidden fields. Change the second form to include:

<input type="hidden" name="textfield"
                value="<%=Request.Form ("textfield")%>">

______


Dano:

"Are you paying the extra $5/month to EverPlanet for
Access database support?

If I don't use a DSN connection for my Access database
(use a DSN-less connection like in your CONFIG.ASP), can I
still have a DBPATH folder with my Access database in it?

How would EverPlanet know if you're using an Access database
if you use a DSN-less connection?"

Me:

I don't pay any extra - just the standard $8.95/month (paid
annually) for the cheap plan. Everplanet don't mind me using
DNS-less. It's the DNS that you pay extra for.

You should read why you may not want to do what I do
however - David Rahrer wrote in and pointed out why my
approach is bad. Read the hero-of-the-week section in the
February 10th newsletter at http://CoverYourASP.com/Archives.asp

______


Dave:

"I downloaded your website, and uploaded on my server, but
when i want to view the default.asp page i get the following
error:

    Active Server Pages error 'ASP 0141'

    Page Command Repeated

    include/Startup.asp, line 2

    The @ command can only be used once within the Active
    Server Page.

I'm using Chili!Soft ASP."

Me:

I've tested the site under Chili!Soft ASP, and it will work
fine, but there are some changes you have to make. One of
them is that you have to copy the top of startup.asp to each
page. Leave the includes in there, just move the first few
<%...%> where it sets up language, buffer, etc.

It's not even really a limitation of chili - I didn't know
at the time, but MS doesn't actually document that what I
do should work. It's "undocumented behavior". Sorry.

______

There were others, but the same old questions!

I have one for you though. My site got crawled last night by
a user-agent that looks normal to me (i.e. like a browser).

Does anyone know what this is:

    "Mozilla/4.0 (compatible; MSIE 5.0; Win32)"

Or, a good site where I can look it up? Normally offline
browsing works fine with browsers, but if I can detect them
I redirect them to http://CoverYourASP.com/JustDownload.htm

This one wasn't very clever though (none are), and was
generating errors and 404's for 3 hours. I just let it roam
but I'd like to confirm its identity and banish it!

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

After getting into almost a stand-up fistfight over a house
we came out on top! To do it we had to apply for a grand
total of 3 mortgages - in case we don't sell our house before
the closing date - aren't we lucky?

But the house is worth all the hassle - now we just have to
wait for 2 months to move in!

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________
____________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I don't know if it's because the sun is shining again, or I
was allowed to re-write from scratch something at work that
had been bugging me, or that I've been approached by 4 other
sites to partner with them (3 this week!), or (and this is
my guess) because an old friend from England flew into the
Peach State on business and brought a supply of my favorite
hand-rolling tobacco after a year of not smoking....but...

Ain't life grand! I open my site with the words:

                    This ASP stuff is fun!

Don't take it too seriously. Have fun with it. Remember you
can't learn how to program, only learn the syntax. You'll
just know if you're a programmer. ;-)

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

17 Mar
______

- Don't forget, the newsletters are also available to read on
the site on my archives page.

http://CoverYourASP.com/Archives.asp

______

18 Mar
______

- Want to hear something bizarre? One advertiser has the exact
same banner displayed in each of 5 slots in my banner system.

Each banner has been displayed over 12,000 times (a fair
sample?) - but the clickthrough rates range from 1.02% to
1.31%.

It might not seem a lot, but 30% is the difference between a
fair and a successful banner!

http://CoverYourASP.com/BannerApp.asp

______

19 Mar
______

- I get a lot of nice testimonials from readers, but I couldn't
resist sharing one from "Conan" this morning: "Best ASP site?
Hell, best damn tutorial site ever! It's helped me so much I
can't thank you enough... download the site... fantastic... I
hope you get the ASP Guild 2001 Top Site Award, you certainly
deserve it!"

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171

______

21 Mar
______

- Came across a new site today - ASPERS.NET. Lots to see,
including a new ASP resource similar to Aspin.com.

http://www.aspers.net/cgi-bin/award/rank.cgi?action=in&id=cyasp
http://www.essentialoem.com/
______

22 Mar
______

- Thanks to Wayne Lambright for pointing out that my PayPal
donate button was broken, then sending a donation when it
was fixed!

Check out his neat survey poll at http://udextensions.com/poll/.

Donate on my improved page: http://CoverYourASP.com/Donate.asp

- Did you know that I publish two "feeds" now from this web
site, that you can tap into?

The first is an ASPWire-style feed at
http://CoverYourASP.com/GetArticles.asp and the other is a new
XML feed at http://CoverYourASP.com/RSS.asp.

The latter can be seen in action at Userland.com - an article
coming soon on the RSS format...

http://my.userland.com/viewChannel$4151

______

23 Mar
______

- I just added support for Persits ASPEmail component - anyone
have any more? My code now support ASPEmail, CDONTS, ASPMail
and JMail.

http://ASPEmail.com/

- I also improved the email code by using the regular expression
/[\s;,]/ to split the email address you typed into the
recommend form.

Translation? You can now recommend the site to more than one
person at a time - separate the emails with space, comma or
semi-colon.

The IsValidEmail( ) function supports this too, and then
validates each email address individually.


____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F


____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

No new articles this week!

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

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

As you know, I like to get inside information about other
web sites - it fascinates me when I discover that a hugely
successful web site is run by a few quite normal people!

This week I asked aspin.com to come clean. I really
appreciate the reply that I got back!...

"The idea for Aspin.com was conceived back in November of
1998 by Pedro Pequeno (Me).  I took the idea to two of my
closest friends, Tony and Manny Domingues and proposed
building it.  The only problem was that none of us knew how
to script ASP pages.   Sure that was a bit of a setback but
we had some previous experience with CGI scripting in Perl
and VB programming in MS Access so we were optimistic.  

First things first, we bought ourselves a copy of Wrox's
Professional ASP 2.0 book and ventured off into the world of
ASP scripting.  Meanwhile, we all worked on picking a
company name... after many iterations, we decided on
InfoGenius from the idea of being the best at managing
information and helping people master ASP or for that matter
anything else we made a search engine for.

At the time Tony was in charge of business matters and Manny
was to help design and program, however, do to their time
limitations, they decided to drop out of the operation a short
time after it's conception.  Undaunted, I forged on with the
Aspin.com idea.  I was in my senior year of college at Penn
State University in my final semester of Electrical
Engineering (Spring 1999) and continued to work on the
Aspin.com project day and night.  

A typical day that semester started at about 10:00AM to make
my first Engineering class.  Even though I barely ever made it
to this class, it was the only thing that got me up that
early!   Between 10AM and 4PM, I usually had about 4 classes...
lets just say that I really tried to make it to at least 1
class per day.  My lab mates didn't really appreciate it too
much and pretty much carried me through my senior project
(thanks Brian Alexander and Brian Totten).  After my classes
for the day, I would return back to my dorm and glue myself to
my PC until about 4AM in the morning.  Eating and Sleeping were
usually 2nd priority to coding.  I ended up losing about 15
pounds that semester... which was good for attracting more
girls but unless they were going to help me code, I didn't
really pay much attention to them.

So about three months after I started designing the first
layouts and concept designs for the site, I released Aspin.com
to the world on March, 1st 1999.  The site traffic grew
steadily over time and before I knew it, the site was serving
up a million page-views per month!  Rather than stopping
there, we decided to take the concept to other programming and
software markets like JSP with our Jspin.com site, Application
Service Providers with our FindApps.com site and finally our
newest addition 411ASP.net for microsoft's new ASP.NET
community.

Currently the InfoGenius crew consists of about a half a dozen
employees.  Our high-strung crew is made up of a diverse
group of college students, that range from brainiac programmers
to Mountain Dew addicted website support guys.  We all have a
lot of fun together, and don't really think of work as "work."  
The most important people though are the half a million web
developers that support our sites every month.  They are the
true innovators in this community.  We get emails everyday from
users showing us what they have made, and they never cease to
impress us with the innovative creations that they come up with.

From us at Aspin.com and InfoGenius, thank you all for your
continued support of our sites!"

http://InfoGenius.com/
http://aspin.com/


____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________


Interesting fact from the logs this week: Chris Oak from my
ISP - http://EverPlanet.com - mentioned something interesting
about my bottom-of-the-line $8.95 account with them...

"You're pushing some bandwidth! You pushed 21 MB in 3 hours"

Seems a lot to me, but I have nothing to compare it to -
do you?

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


Thanks to David Levine, Steve Annells, Robert Brooks and
Kevin McCurley who answered my question "What is
WebFountain?"

Kevin described it simply: "It is a large-scale crawler for
use in our web research activities here at IBM Almaden
Research Center."

Robert added a little more:

"Why is that name (and that picture!) familiar?"  A little
more poking discovered the reason... McCurley is the
insane genius behind digicrime.com, one of the first sites
I ever surfed on the 'net!  He purposely plays hacker
tricks with JavaScript, doing things like infinitely
cascading windows and scary "your computer is about to die"
spoofs.  Everything is safely behind "don't click this or
'X' will happen" links -- of course, being a hacker myself
(as in, self-taught by seeing how things work), that only
made them all the more intriguing.

I'm sure whatever he does with the WebFountain spider, it
will be (nearly) harmless -- and in any case, very
interesting!"

Thanks for your all your help in the investigation!

______


Chris Snider (regarding my question, "What is this user
agent: Mozilla/4.0 (compatible; MSIE 5.0; Win32)?":

"Since Microsoft has released the wininet.dll (browser
object inside IE) and also the msXMLhttp object (with the
XML Parser) you could have a spider built by someone that
is not part of one of the major search engines.  There is
code at devdex (http://www.freevbcode.com/ShowCode.Asp?ID=2143)
that VB coders can use to write their own off-line site
grabber.

I also ran across another vb project that takes a URL
argument and begins processing the pages at the URL for
ever adding the items to a treeview control.  It is
possible that someone is using something similar on your
site.

Whoever is doing it is using the MS Internet Explorer (or
inet control) from a Win 95/98/NT/2000 system."

Me:

Thanks Chris. I figured the same thing.

______


Mark Craies:

"Hi James, Found your site yesterday, downloaded your code
and installed it on my W2K box. Just going through the
setup and I see you don't yet have support for the ASPEmail
component by Persits in the config.asp and email.asp files.
I noticed your comment that says to ask you for others so
here is a request to add the Persits component. I've had a
go at setting it up myself but I'm not sure about the = 826
etc in the // Email server constants.

I'm using this instead of ASPMail as my ISP uses it and its
easier to write for it on my test environment.  Cheers Mark"

Me:

Thanks Mark. I've added support for the Persits component and
uploaded it to the site. Thanks for the feedback!

______


Claudia Botts:

"I just wanted to say thank you. I am a (relative) newbie to
web programming and I can use all the (free) help I can get.

I just wanted to say maybe you'd wanna consider revising your
e-mail validation code to allow people (me) to send it to
more than one person (using semicolons between addresses). I
work with a group of people who could benefit from your site
and others like it, but I had to send the recommendation one
at a time.

I know, you're probably thinking, "Poor, pitiful you! Big
Deal!" but I was just really just wondering if your validation
code could do multiples. I guess it could, I'd just have to
loop it through each string after a semicolon (after the
first one), right?

Well, I guess I just ansered my own question, but I still
wanted to say thanks!!"

Me:

How spooky! I have just finished implementing that very thing!
I changed my SendEmail() and IsValidEmail() functions to use
a regular expression to split the string.

Here's a snippet from the new IsValidEmail() function:

     // test all email addresses sent in
     var sEmailList = sEmail.split ( /[\s;,]/ );
     var nEmail;

     for ( nEmail in sEmailList )
     {
          // validate sEmailList [ nEmail ]...

So now you can recommend all your friends at once, and the
email addresses will still be validated. Cool, eh?

http://CoverYourASP.com/Recommend.asp

______

Lily Liu sent some detailed explanations on the steps she
had to take to get the site working on her computer. It
seems she had a few more problems than normal. I appreciate
the feedback though.

"Hi James, Thanks for the help. Here is my path to make your
site working:

1. problem:
    "Server object error 'ASP 0177 : 80029c4a'
    Server.CreateObject Failed
    /cya/utils/Email.asp, line 31
    Error loading type library/DLL."

    solution: change the line to
    oMail = new ActiveXObject( "CDONTS.NewMail" );

2. problem:
    "Microsoft JScript runtime error '800a0030'
    Error in loading DLL
    /cya/utils/Email.asp, line 37"

    solution: IUSER_xxx does not have enough privilege,
    in WINNT\SYSTEM32, change all file permissions to RX

3. problem with oMail.send in Email.asp (documented in
    your website)

    solution: change Mailroot\Pickup permission for
    IUSER_xxx to RW

4. "unspecified error" (documented in your website)

    solution: in include\Config.asp file change:
    var sDBDriver=sAccess2000;
    and convert database to Access 2000 format.

5. "...cannot open the file ..., It is already opened
    exclusively, or you need permission..." (documented?)

    solution: go to the CYA folder, change permission
    for all files to RX, change database permission to
    RWX for IUSER_xxx.

There are still some minor problems which can be more
easily changed. Thanks for opening up your website, I'm
sure that I can benefit form the site. Best wishes."

______

Vu:

"James...very impress with what you have been able to do
in the amount of time considering this is still only a
"hobby".  I have been programming ASP only several months
now and want to go down the right path.  

I have taken you advice and have started looking the
EditPlus editor.  What is your advice regarding debugging
of ASPs.  Should I invest time in learning something like
Microsoft Visual InterDev.  I do alot of work from home
on a Win98 system.  Please advise...thanks, Vu."

Me:

To be honest I don't do much debugging in the traditional
sense. I don't use InterDev - the disadvantages outweigh
the advantages (for me).

So, debugging ASP for me consists of doing this:

    http://coveryourasp.com/debug.asp

Not very glamorous, but it works... ;-)

To be perfectly frank, JavaScript and the ASP objects are
toys in many ways. I'm glad that I learned C on DOS first,
because that gave me a very deep understanding of low level
programming. From that base, every other language is
trivial. I'm looking forward to C# but it'll be strange
having garbage collection in C!

Anyway, I digress. Whenever I need to do anything
"complicated" on a web page, I'll write a COM component
(in C++ with ATL) and hence all the debugging I could want
with VC6. ASP pages *very* rarely need more than "print
statements".

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________


Just to broaden your horizons, nothing about the site at all
to close this newsletter.

Instead, check out more awesome cars from Chrysler that were
at a recent car show - they so outclass the other manufacturers
concept cars!

(watch the URL wrap)

http://carpoint.msn.com/autoshow2001/default.asp?
content=article&param=OEM_Chrysler_DaimlerChrysler2

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

No, I know it's not Saturday yet, but I have to interrupt
your normal programs for an important announcement!

I'm driving down to Florida for a week tomorrow morning, so
the site will be completely unattended for a week.

I'm going cold turkey, so all emails will go unanswered, no
diary entries, no new articles.

It'll be harder for me than it will for you, believe me!

So, I thought I'd give you a quick update...

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

23 Mar
______

- I just added support for Persits ASPEmail component - anyone
have any more? My code now support ASPEmail, CDONTS, ASPMail
and JMail.

- I also improved the email code by using the regular
expression /[\s;,]/ to split the email address you typed into
the recommend form. Translation? You can now recommend the
site to more than one person at a time - separate the emails
with space, comma or semi-colon.

The IsValidEmail( ) function supports this too, and then
validates each email address individually.

______

27 Mar
______

- OK, the next stage in the development of this site is almost
here. Firstly, take a sneak peek at the new look for the site
that is nearing completion.

http://CoverYourASP.com/NewLook.asp

Secondly, I finally took the time to install Visual Studio.NET
and the .NET framework, so it's full steam ahead with
re-learning everything I know!

Mmmmm, now which language shall I write the new
CoverYourASP.NET site in? It won't be VB, but I'm still torn
between JScript.NET and C#. Perhaps you'd like to vote?

http://CoverYourASP.com/Contact.asp

______

28 Mar
______

- The new banners are here. If you're kind enough to use one
of my old buttons or banners to link to my site, please update
them.

http://CoverYourASP.com/LinkToUs.asp


____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F


____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

One new article this week, documenting how I wrote my
newsletter archive page.

"Caching and displaying contents of folders"

This article shows how I cached data from the
FileSystemObject into Application variables, sorted it and
then used it to create a nice little file contents browser
to display my newsletter archives.

http://CoverYourASP.com/ArchivesDescr.asp

____________________________________________________________


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

                http://www.codecharge.com/
____________________________________________________________


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.

             Visit http://www.codecharge.com/

____________________________________________________________

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

Fresh out of heroes this week, although perhaps it's my tax
accountant who just sent me my tax returns and informed me
that I'll be receiving a $6,000 refund.. ;-)

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________


No time to go through the emails just now, so you'll get
double next week.

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

I'll be returning next Friday, but undoubtedly the next
newsletter will be a little later than normal, perhaps
Saturday night or Sunday morning.

Have fun, I know I will!

P.S. Last chance to vote - the contest on ASP Guild closes
soon. Let's have a last minute rush to the line!

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________


Normal service will now resume! I've had a nice vacation,
read and/or answered the 600 emails waiting for me, and now
it's time for this, my last item of the to-do list.

Then I can do some work!

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

6 Apr
______

- I'm back! I had an excellent time, but response time may
still be a little slow to your emails - I have over 600 to
sift through... ;-)

______

7 Apr
______

- Thanks to the anonymous user who pointed out that the link
to the source code of utils/database.asp was broken on the
Server Side Includes page.

http://CoverYourASP.com/SSI.asp

That's now fixed, and I now get emails when similar things
happen - my ShowSource.asp page doesn't show files that
don't appear in its switch statement just to give me the
option of hiding some files on my site!

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

Of course, no new articles this week, but I have improved
the Server Side Include page - there's now a "View the source"
link next to each SSI.

This will allow you to see the source for particular files
without downloading the whole source code. You could always
copy/paste the code into a new file if you wanted to get the
updates!

http://CoverYourASP.com/SSI.asp

____________________________________________________________

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

Since I've been on vacation, I haven't prepared anything or
been able to get a decent biography from a real hero, so
I'll take the easy route (no change there) and nominate my
wife Tara.

http://ShawThing.com/images/BenchTwo.jpg

She's sitting in the room with our 20 month old son Jesse
fast asleep on her lap, knowing that she can't talk to me
(well, she can, but she knows she only gets grunts back).

I sit in front of this beige box quite a lot as you can
imagine (try every minute that I'm not doing odd-jobs), but
strangely I don't get any grief for it.

I think it's because she's amazed that one of my
hair-brained ideas actually became successful.

I've had quite a few attempts at doing something
(anything?) from selling craft-fare trinkets mail order
(I sold 11) to investing in rare coins (he was a conman) to
spending 12 months with 3 partners writing a huge web site
that never got launched, and now sits on my "maybe-next-year"
list.

I should have asked previous heroes, but I wonder if that's
a common theme - behind every successful web site there's a
very, *very* patient wife... ;-)

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Percival Bragg:

"I would like to allow some friends to view my ASP code for
the pages on my site. I copied the ASP pages and changed
their extensions to .txt expecting that when I linked to
these files notepad, or some other application, would open
up and display their contents. This does not happen."

Me:

That's what is supposed to happen I'm afraid. A browser
cannot open another application for security reasons. You
obviously see the text file inside the browser, but Notepad
won't be used.

______


Desmond:

"I got most of the search working while you were away.
Funny thing though I had to put a space in front of the
fields in the database and then the search worked. Hmmmm.
Any way the only part I have not figured out is how to
print a group heading for the fields. Welcome back. Hope
you and your family enjoyed the time away."

Me:

We had a great time thanks.

I do a word search, hence I search for space followed by
the word you search for. So you need a space at the front
of each field, exactly as you found, or the first word
in the field won't ever be found.

______

Paul P-W:

"Your site looks great - I'm just getting into this ASP
game & was in need of some friendly advice, so thanks! :>)

Here is a problem that you *might* not be aware of, might
have a fix for & also may want to refer to on your site:

I have installed PWS (from a Win98 CD) onto my laptop which
came with WinME (it is not included with WinME - see
Microsoft knowledge base Q266456).

It installed okay (apart from a problem with MTS, documented
in Microsoft knowledge base Q246081). PWM then seemed to run
okay, but I could not get Frontpage2000 to publish to my PWS
directory - it gave an error and suggested I try ftp instead.

I also could not run the server extension manager that
installed with PWS - it told me there was a more recent
version of the server extensions on my PC.

I have downloaded the Windows NT 4.0 Option Pack which has
another version of PWS, so I will try that next.

Thanks for your time."

Me:

Thanks Paul! I knew about the first two issues, but not
about FP. FP is of course the devils spawn - see
http://coveryourasp.com/Search.asp?frontpage

______

Indira Bhat:

"What is the best way to walk through the folders
recursively and list them ORDER BY LAST MODIFIED DATE?"

Me:

Store the file dates in an array, like I store the names in
an array in http://CoverYourASP.com/ArchivesDescr.asp, and
then sort the array afterwards.

Using my code as a basis, the oFile object has a property
that you can query to get the date - oFile.DateLastModified.

______

David Davtian:

"Hi James, first of all great-great website, I've learned
a lot from your work and I'm glad that there are people
like you in this world.

So I have an ASP driven membership website and I'm running
an SQL server for the back end, and I'm trying to find a
script that will show which member is online, perhaps
showing a list with all members and those folks who are
connected to the server, a red star or something next to
their name and those offline will have no star.

Do you know where I can start?..where/what I can research?"

Me:

I've been asked that a few times, but I've never needed it
myself. Maybe in the future when I have a real members area
or forum it'll be useful.

I'd suggest setting the members status to "online" by adding
code to update the database in utils/login.asp, ValidateLogin,
just below where the session variables are set up.

See http://CoverYourASP.com/ShowSource.asp?page=utils/Login

To keep note of logged out users, update the database in
global.asa's Session_OnEnd.

______

Kurt Meyers:

"I use to have something in VBScript that took a 9 digit SSN
and split it so I could put in the '-''s. But after looking
at your code I have grown fond of JScript. I was just
wondering how can I do that in JScript?

Here is what is looked like in VBScript :

Left(SSN,3) & " - " & Mid(SSN,4,2) & " - " & Right(SSN,4)

Any help would be greatly helpful"

Me:

JavaScript's string object has a slice method (amongst
many other useful ones) but no left/mid/right- but see
http://msdn.microsoft.com/scripting/jscript/doc/jsobjstring.htm

______

Carl Revell:

"Just a simple one, I found that by doing a refresh on the
SurveyResults page I was able to increment the option I'd
voted for with every page refresh. I noticed the code uses
a Cookie to prevent this and I have cookies enabled but was
still able to increment the count.

I refreshed 3 times if you want to reduce the value for an
accurate count!

http://CoverYourASP.com/SearchSurvey.asp

Me:

Thanks! If you look closely, you'll see that I set the
cookie, but never test for it! I must have been interrupted
while I was writing that bit!

Thanks for letting me know!

______

Conan:

"Reading through your ad-system and how it manages user
clickthroughs, I noticed a little "flaw" (or "feature", in
case you already knew about it).

It's not a flaw that is bad for your advertisers. Far from
it; it could be losing you money!

Lets see... Only one application variable for storing used
IP addresses? Shouldn't you set up a variable for EACH
advertiser?

This would mean that someone could hit your site, click an
ad and that would be it. If he came back to your site again
and clicked a different ad, the clickthrough would not be
registered and you would have given away a free clickthrough!

P.S. Love the new-look site - looks like the best just got
better.You should definitely use JScript.NET not C# for
CoverYourASP.NET ;-)

Oh, and I hope you enjoyed Florida!"

Me:

What led me to that decision were spiders. I wanted to play
it safe for my advertisers, and if a spider hit the site
"clicking" on every banner I wanted to minimize the damage.
I still think that keeping advertisers happy is worth a lot!

P.S. You're losing the fight for Jscript.NET - everyone
else wants C#. :-(

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp
____________________________________________________________

Looks like you might get to meet me if you go to Web DevCon
2001 in Denver on June 12-15. I've been invited, and might
just try and go - the company I *really* work for has an
office there.

Now, I just have to arrange a business meeting for the same
time period... ;-)

Check it out: http://www.webdevcon.com/default.asp?a=397

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 CoverYourASP.com)

http://www.aspguild.org/group/~12/asp/voteasp2001.asp?a=171
____________________________________________________________
____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________


Some significant changes to the site at last! Affiliate sites
now get shown at the bottom of the page, and there's a new
section "My personal favorites" on the front page. More on
those later.

It was also a good week for traffic - Monday was the busiest
day ever with over 3,000 visitors and 17,000 page views - all
due to appearing in the Lockergnome daily newsletter.

And, of course, we had the obligatory bad day to compensate.
If you have a good day, the same week has to also include
some minor catastrophy (it's a rule). Friday morning the
site was almost unreachable for a few hours while someone
upstream from my server went down.

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

9 Apr
______

- Welcome to all the LockerGnome readers who are visiting the
site today! I recently re-subscribed to their newsletter
after a few years away, then realized that I now had
something others might want to know about! It looks like
it'll be a very busy day for my server...

______

10 Apr
______

- I just uploaded a new set of source code for the first time
a couple of weeks (vacation, remember?!!) - quite a few very
small improvements: stopped spiders indexing or following
links from the database administration pages (because they
spend hours indexing 1000's of pages as they scroll through
the database tables!); I now show "[Anonymous]" in the
tell-a-friend email if no name is entered and a few other
really small things. In fact the zip files are more up to
date than the site for once, since they contain a slightly
re-designed site with the affiliate links moved to the bottom
of every page...

______

11 Apr
______

- I've added a new section to the front page today - suggested
articles. Existing members can see it by personalizing the
front page...

- I changed the site around a little - the affiliate sites
that kindly publish my articles are now rotating around the
bottom of every page, and all shown on the Resources page.
I moved them into a new database table and now have more
room on the right side of the site. A lot of database code has
been updated to (almost) work with SQL Server too...more
later!

______

12 Apr
______

- There have been quite a few hits from people clicking on a
link in an email today - and of course I have no idea what
the email might be about, or who it was from. If anyone
knows of an email from another site that mentions CoverYourASP
please let me know so I can thank them!

______

13 Apr
______

- I just realized that it's Friday the 13th, which explains
the trouble this morning! Apparently a provider upstream from
my server has been very slow for the last few hours - to those
of you affected I'll apologise on their behalf. It seems back
to normal speed now.

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

One of the smaller changes I made was to stop any spiders
indexing the database pages - there are 180 pages of data in
the Members table alone.

I did two things - modified my robots.txt file and output a
META tag. Hopefully each spider will support at least one.

To exclude some files using robots.txt I added the following
lines:

Disallow: DBAddRecord.asp
Disallow: DBEditRecord.asp
Disallow: DBDeleteRecord.asp
Disallow: DBEditTable.asp

On those pages I now set a new flag, bAllowIndexing, to
false. This causes the MetaTags( ) funciton in utils/Init.asp
to output the following tag:

<meta name="robots" content="NOINDEX,NOFOLLOW">

______

When I created the new section on the front page I needed to
add it to the personalize page so that you could turn it
on/off. So I needed a new YesNo field in the Members table.

Rather than download my Access database, modify it and
upload it again (taking down the site in the process) I
simply created a simple temporary page that contained the
following:

DBInitConnection ( );

oConnection.Execute ( 'ALTER TABLE Members ADD bSuggestions
                         YESNO DEFAULT No' );

This modified the database online ready for me to upload the
new code.

______

One new article this week too - not published anywhere
because it's very much internal site documentation, but many
have asked the question...

"Administering the Application variables"

Following earlier articles about how I cache data (such as
the rotating banners) in Application variables for speed,
many have asked how I refresh the cache when I've made a
change. All is revealed...

http://CoverYourASP.com/ApplicationAdmin.asp

____________________________________________________________

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

This weeks hero is Steve Smith of ASPAlliance.com. I've had
the opportunity to watch him work on a new project recently
and was very impressed by his dedication to the task!

As always, I like to hear some gossip from webmasters. Here
is some in Steve's own words:

"I graduated from college in 1997 with my BS in Computer
Science Engineering and I'd never touched VB or any of the
Microsoft technology.  My employer put me through a 2 week
boot camp and within a couple of months I was an MCSD.  

Six months later, I was in the middle of a one-man ASP
project when I found activeserverpages.com.  This was a
handy site for learning about ASP, and one day I found a
page describing how contributors would receive free web
hosting, email, sql server and could even get paid(!) if
their columns brought in enough traffic (like $50 if you
averaged 500 hits/day for a month).

So I began my column, basically documenting things I was
learning about ASP as I learned them for my own use, so
that if I couldn't remember how to do something I could
always go to my column and re-read my own tutorial to see
how to do it.  I still do that today, and it's one of the
greatest benefits of having a column on ASPAlliance, in my
opinion.  Well, after a while, my column became rather
popular, and yet I never received any payments for it.

I implemented a user and traffic tracking system for the
site, and soon had months worth of data showing detailed
information about my traffic, which had been over 500
hits/day for months.  I talked to Charles Carroll, then
owner of ASPAlliance.com, about the payments that were
promised, and he admitted that he didn't have any way to
track individual column's traffic, but agreed to pay me
since I had documented my traffic myself (which he then
did).

Another year or so passed, and Gary Williams, who is now
with ASP101, was running the Alliance for Charles.  
Running it into the ground, I should say. Nothing got
done.  Requests took weeks or longer to happen.  The site
had a lot of issues.  In spring of 2000, Charles had had
enough.  He dropped Gary, and went to the columnists,
asking them to elect a president for the site.

I reluctantly agreed to run (I was and am employed full
time and could only handle so much in the way of time
commitments), and as it happened I was the only one who
ran, so I became "president" of ASPAlliance, with
responsibilities to manage user accounts and market the
site and build up the infrastructure and site design.  

I took over about a year ago, on April 15, 2000.  The
terms were supposed to be quarterly, with elections each
quarter, but after the first quarter Charles decided he
no longer desired to have an ownership interest in
ASPAlliance.com, and he gave the site to me. One of the
first things I did as part of this deal was pay all of
the long-standing columnists for their years of writing
that went uncompensated.

Since then, I have accomplished one of my primary goals,
which was to put in place an equitable traffic monitoring
system that lets me pay out royalties to columnists based
on the number of advertisements their columns show each
month.  Columnists still get all of the benefits that
attracted me in 1997:

-free ASP hosting (with .NET now),
-free POP mail account,
-free SQL Server (2000) access,

as well as quarterly royalty checks.  

Traffic at the site has been steadily increasing, but
could certainly be doing better.  My current goals are
almost all marketing based, and involve growing the site
as a brand and promoting it to potential authors,
advertisers, and users."

http://ASPAlliance.com/
http://ASPAlliance.com/SteveSmith

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Interesting numbers from the stats department:

Since 1/21 - about 12 weeks - there have been nearly 25,000
downloads of my site, or 1.3 gigabytes of data!

Astonishingly, that's roughly 300 downloads a day!

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Tim LeForge:

"Do you know of a way to allow for the download of an ASP
file (like a browser would allow for the download of a ZIP
file), without having to rename it?  Not actually running
it, but downloading the actual file (so the user would get
a "Do want to run this...?, Do you want to save this
file...? prompt)."

Me:

No, not without renaming it. IIS will execute files it sees
requested with the asp extension. You could always open the
file with FileSystemObject and display it in the browser
that way - see http://CoverYourASP.com/ShowFileDescr.asp

Anyone have any more ideas?

______

Jeff:

"I really like your site. I am learning asp. How can I export
the results of a form to a text file or a spread sheet, and
then attach that exported file to an email."

Me:

Use FileSystemObject to create and write to a file - see   http://msdn.microsoft.com/scripting/jscript/doc/jsFSOTutor.htm

Adding an attachment is easy - inside utils/Email.asp there is
a commented out line that shows how to.

______

Ismed Sitepu:

"Hi James! I was surprised that one of sample site that I
opened Telemagicsales.com uses the same method that I trying
to use on my "experiments&learning" web site.

Telemagicsales.com uses Macromedia to generate their layout
and popup menu. By using this method means that we have to
use Macromedia Javascript on a text file that has to be
pushed to client PC to enable to run in local, please see
below code (code a):

  <script language="JavaScript1.2" src="/fw_menu.js"></script>'

I saw the size of above Javascript is around 22kb and has to
be reload as many time as the client PC open the pages. This
size seems too big to me and inefficient for client bandwidth.

Do you have another method rather than to push the above
Macromedia Javascript to client PC for running the pop-up
menu on client browser?

Me:

I think I'm right in saying that using the <script> tag with
a .js file won't be as bad as you think, because just like an
image that you use over and over on your site most browsers
will cache the js file on the users PC.

______

Robert:

"I have been able to get this to work on my local and then
if i make changes to the config file on the web. What could
be done to have a line of code that says if Local then this
path if host then this path. that way you would not have to
change the file and would be better for development reasons.  

I tried an asp line but it did not work. Thanks"

Me:

I have a similar need, but it's for email component instead
of database path. I use a different one on my development
machine and the server.

The include/config.asp file is the only file that's
different in the download from what's on the site, and
that's for security. Here's how I modified it to use a
different email component...

  var sServer = '' + Request.ServerVariables ( "SERVER_NAME" );

  if ( -1 != sServer.indexOf ( 'localhost' ) )
    nEmailServer = nEmailCDONTS;
  else
    nEmailServer = nEmailASPMAIL;

This allows the site to use different email components
depending where it's running. The same could easily be done
for database paths.

______


I came across a neat idea this week and it's worth sharing.
If you run a site you'll know how interesting it is to see
who is linking to you.

The search engines can help you find out by searching for
"link:http://yoursite.com" - pages that link to you will be
shown. Of course this assumes the sites that are linking
to you have been indexed!

The new article came up with a neat way to track this.

First, create an account at http://TrackEngine.com

Second, go to the search results you want to track - I track
results from AltaVista, Google, HotBot, Lycos, MSN and
Northern Light.

On each results page, save the long URL to TrackEngine and
it will then email you when that page changes, i.e. when
the search engines find another link to your site.

I've set mine to check once per week, but you can check
every day if you wish!

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

Is the site missing anything? Some people have asked for a
forum, but aren't there enough forums around?

Or maybe I'll finish off the search so it searches the pages
themselves as well as my keywords?

I'm running out of things to do, so unless I hear otherwise
it's time to start designing/coding CoverYourASP.NET...

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.

____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I'm moving house in 3 weeks, my green card is in it's final
stages (needing another inch-thick pile of forms), but it's
just not enough work! I had to go and open my big mouth
about sharing content between sites!

Seriously, the new project and new website (full details
below) is a lot of fun, and I'm learning a lot. XML,
schemas, web services...

Another thing before I forget - the ASP Guild's contest
just finished and I'm proud to say CYA came in 2nd!

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

17 Apr
______

- I've been documenting some classes I wrote at my "day job"
recently - and I needed a way to easily create and edit
flowcharts. I ended up deciding on SmartDraw. I liked it so
much that I added it to my recommended resources.

Check it out:

http://www.smartdraw.com/specials/diagram.asp?id=1270

______

21 Apr
______

- Slight change of plan this week - the newsletter will go
out Sunday night / Monday morning instead of Saturday...
  
____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

3 new articles this week. First was a much needed re-write
explaining how to tell-a-friend.

http://www.CoverYourASP.com/HowToRecommend.asp

______

Search
______

Early in the week I modified utils/search.asp so that it
sent me an email when you searched for something but found
nothing. It was an eye-opener how many searches were
failing!

Incidentally, many of the searches would have failed even if
I searched the article content rather than my keywords.

The biggest problem is that people specify too many words in
the search. As explained on the page, the words ALL MUST BE
PRESENT to match a page.

If you search for "application varaibles" (note the deliberate
typo) you'll find nothing, even though "application" appears
in many pages.

______

Maintaining state with Session variables
______

One search item that didn't find anything was "session". I
was surprised to see that I hadn't documented session
variables anywhere, so that prompted a new article.

http://CoverYourASP.com/Session.asp

______

I now STOR my articles - do you?
______

After writing the session article I went through my normal
procedure of submitting the article to the resource sites
on my list. There are 23 of them, and because the forms are
all so different the process took me 90 minutes!

Nowadays, that's just silly.

I got to thinking about standardising the form input names
so I could write an application to submit to the forms
automatically, and wrote a page describing what I called
the Form Submission Standard.

http://CoverYourASP.com/FSS.asp

The concept took off and was met by lots of emails supporting
my effort. Charles Carroll created a list to discuss the new
standard on - you can join at:

http://www.asplists.com/asplists/asprss.asp

One thing became obvious very quickly - the FSS was too
narrowly focussed on forms, and should be widened to
encompass publishing any kind of resources from an authors
site.

Resource sites such as http://fuzzysoftware.com and
http://aspin.com immediately supported the new standard
which relies on XML to publish the resources.

Steve Smith of http://aspalliance.com wrote the first draft
of an XML schema, I wrote some code to publish my articles
in that format and the project keeps advancing...

The project has now been renamed from FSS to STORS -
the Shared Table Of Resources Standard.

Look for buttons appearing on sites saying they STOR their
articles! The new standard has a new home now too. The site
is very temporarily living in a subfolder of CYA as I write
this, but keep an eye on http://STORS.net over the next
week...

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

The heros this week are the people who joined me on the FSS
(now STORS) discussion list and helped point me in the
right direction:

Steve Smith of http://ASPAlliance.com
Charles Carroll of http://LearnASP.com
Peter Brunone
Scott Mitchell of http://4guysfromrolla.com
Scott Watermasysk
Sam McDonald
Farhan of http://visualbuilder.com
Ryan Healey of http://fuzzysoftware.com
Mitch Denny of http://warbyte.com
Michal Ferber of http://aspGuys.com
Gavin Williams of http://Hexillion.com
Pedro Pequeno of http://aspin.com

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Many emails, but all asking the same old questions! Well,
there were a few other interesting ones, but many of them
are prompting an article, so they don't need mentioning
here! Here's just one that I'll pass on...


James (not me):

"Hi, I wonder if your banner management system can also
track #of visitors from banners that I have placed at
different search engines? Thanks"

Me:

No, but I have code that you could tweak a little to do that
- it's not a complicated thing to do.. You'd want to specify
a different URL for each banner, e.g.

TrackRefer.asp?banner=1234

How complicated you make the TrackRefer.asp "page" is up to
you. You could include code from my stat counter,
StatCounter.asp, that stored a new record in your database
for each clickthrough, including IP address, referring URL,
etc, or very simply just increment a counter for that
banner ID.

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

STORS.net will be my priority this week, both writing the
code that will be given freely to authors and resource sites
to implement the STORs, and the STORS.net site itself.

There is plenty to do, so if you're interested in helping
out at all, join the discussion list at Charles Carroll's
http://www.asplists.com/asplists/asprss.asp

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.

____________________________________________________________

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

          Do you want to subscribe or unsubscribe?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

Topic of the week is of course STORS - the Shared Table of
Resources standard that I'm spending all my spare time on.

But it is related to CoverYourASP, and you'll be the first
to know when I write an article documenting the mad last 8
days.

The evolution of a new standard is exciting stuff, and
because the open discussion list has been quiet for almost
2 days now means that we're getting close.

See what the fuss is about at http://STORS.net/

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

There was no diary this week!
____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

You know of course. No new articles or code uploaded.

But don't go! There is some good feedback email coming...

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

Stuart Brown is this week's Hero - see below the first of a
series of emails he sent as he worked through the site
making the necessary changes to make it work with MySQL.

He's not done yet, but is kindly sharing his investigation
and a list of things he's had to modify.

Thanks Stuart!

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Tonny:

"I'm doing development on my home machine using PWS.  When
I want to upload to another server, do I need to retype
all my asp page references, changing the name from
"http://localserver/" to whatever the new server path is?  

How can I code my pages so this is not necessary?  It seems
like a basic question, but I can't find the answer anywhere.  
Can you point me in the right direction?"

Me:

Sure can. Just use relative links on your site, i.e. just
the page name like <a href="/default.html">.

The base href will be used to make them absolute paths - all
you need to do is make sure the arrays at the bottom of
include/config.asp have an entry for the server and the dev
machine.

Read http://CoverYourASP.com/DownloadConfig.asp
and http://CoverYourASP.com/BaseHref.asp

______


Constantinos:

"I try your STATS code resides in footer.asp in conjuction
with statcounter.asp It works fine with localhost but it is
NOT working in my hosting place"

Me:

Errors in StatCounter.asp are tricky, because you don't see
them in the browser - my pages call StatCounter.asp using an
<img> tag, and therefore anything you send back that isn't
an image doesn't get rendered.

The trick is to run StatCounter.asp yourself, as a normal
page.

http://CoverYourASP.com/StatCounter.asp

(Note: on CYA I have the bStoreStats flag set to false, so
the page immediately stops, with no output - but on your
copy you can set the flag in include/config.asp)

Now, running it directly like that will always fail because
the page is expecting some parameters passed to it via the
QueryString.

The "normal" error is:

   "The changes you requested to the table were not
    successful because they would create duplicate values
    in the index, primary key, or relationship."

But you'll see your error. Add a Response.Write to display
the SQL before the oConnection.Execute.

______

Keith:

"I am trying to find a download for installing a PWS for
Windows 2000.  I have not found anything.  Do you suggest
anything for me.  Any sites for the download.  I looked at
Microsoft.com but could find nothing."

Me:

You don't need to use PWS on Windows 2000 - it has the
full-strength IIS included. Go to add/remove programs,
windows components and you'll see an IIS checkbox.

While you're there, highlight IIS and click Details. You
can then check SMTP service, and you have CDONTS email!

______

Kurt:

"I am running asp through a OBDC driver to query data on
DB2 on an AS400. I finally got it to work. But some
properties on the RecordSet do not work. Like when I try to
retrive the Number of records oRecordSet.RecordCount it
return's a -1 ??"

Me:

When that happened to me i was using the wrong sort of
cursor type - they don't all support all the properties.

Try adOpenDynamic

______

Brad:

"Quick question: I have always enjoyed your site and find
it to contain very valuable information.

What has been your success rate with the voluntary upgrade
in membership? Have you had any backlash or do you find
that the visitors are coming to realize that good content
will come at a price?

I have a site that people love and I am considering making
some value added serves that people can opt to pay for.

I am curious about the mindset of the people and if they
are willing to pay anything for better access to a site.

Any thoughts you have would be appreciated."

Me:

You're not going to like this!

Let me put it this way - 8 people out of nearly 300,000
visitors have sent donations.

1 person has upgraded their membership - but I openly say
that there's nothing there for silver membership yet.

There *was* for about a week, but I had no response at all
so I put all that content on the free part.

(Interestingly, the content that was "members only" for a
week is one of my most popular articles - installing
Personal Web Server)

The internet just isn't like that though - it's not that
my readers are poor or tight with their money. It just
doesn't work like that.

There isn't one resource that I pay for, so I'd be a
hypocrit if I complained. It just makes the rare donations
more satisfying!

Hint: http://CoverYourASP.com/Donate.asp

______

Kevin:

"I read your article about preventing email abuse with
opt-in lists. It's a really good idea, and the implementation
seems first rate as far as it goes... but I was recently
involved in building a site with some similar features, and
would frankly suggest that to be truly spam-unfriendly you
go one step farther than your "blocked address" approach.

Yes it's fine once someone complains and you can add them to
your "blocked" list, but let's face it: a lot of people
don't complain, they just put your site on their s**t-list
and get more and more annoyed at you as time passes.

I would actually recommend a more proactive algorithm that
keeps track of all email addresses you send to, and don't
allow a message to go out to any single email address more
than - for example - once a day.

In our (admittedly jaundiced) experience there are people
out there who can be *extremely* inventive at using web
sites to annoy and harrass other people: you wouldn't
think it, but a simple convenience feature like "i forgot
my password, please email it to me" can be subverted into
a powerful denial-of-service tool.

In any case, liked the article - and your site in general -
just wanted to make a friendly suggestion."

Me:

That is an excellent suggestion. I will leave your email
in my Inbox until that gets implemented. It really isn't
hard to do either - I'll build it straight into
utils/email.asp.

Of course, I'll have to allow multiple emails to be sent to
me, otherwise I might get some work done... ;-)

(I should say at this point that there are now 17 "excellent
ideas" in my Inbox. I'm trying hard to resist the temptation
to move them into a "things to do" folder because then I
really will forget about them)

______

Talking of excellent ideas and helpful readers, here's another.

Although I've had offers to help write support MySQL before,
Stuart just did it and sent me some instructions...perhaps not
complete, but you "open-source" guys like hacking:

Stuart:

"OK. Here's a brief synopsis & code snippets of what I did -
(WIN32 version for simplicity - W2K,W2KPro,ME,98,95(?), but
Linux version works, just takes a bit longer + two boxes
required)

1) Software Required -

a) MySQL - latest version from http://www.mysql.com/downloads
b) MySQLODBC (reqd for Access to MySQL) - http://www.mysql.com/downloads
c) MyOLEDB - http://www.mysql.com/downloads (should be MySQLProv.2.5)
d) WinMySQLAdmin - http://www.mysql.com/downloads
e) Access To MySQL - http://www.mysql.com/downloads/win32/myaccess2000_1_4.zip

2) Process -

a) Install all above & test connectivity from Access (2000 or 97)
via AccesstoMysql (fairly straightforward to do) via tools,
addins, MyAccess (needs DSN pointing to MySQL core database -
similar(?!) to master in MSSQL)

b) Create new database in MySQL e.g. CYADB via WinMySQLAdmin
easiest

c) Upsize the DB.mdb from your site code to MySQL-CYADB Database
(including the data) - note - only Primary Keys are given an index
- need to manually add any other indexes required.

d) Create a Data Source (easiest way) called "CYA" see below

3) Site Code Changes -

a) Config.ASP -

could add new var eg sMySQL (set to "MySQLProv.2.5"). Didn't mess
too much with your code & variables - just cheated & set string
complete - leave you to mess with!

Whole connection string needs to add upto -

var sConnectionString = 'Provider=MySQLProv.2.5; Data Source=CYA;
    UID=XXXX; PWD=YYYYY';

or can use Server= , Database= depends how you want to show it.

b) Got some other errors in some functions in different scripts
(can't remember exactly which ones) - srangely just cosmetic like
a carriage return in a function - that sort of thing.

4) Obviously security needs to come into the frame here (like MS SQL)
- UID & PWD need to be a user that only has enough rights in MySQL
in this database - quite straightforward to do etc etc.

As I said before - hadn't tested all the functionality, but
fundamentally this works.

Would suggest if you consider extending this support into your
code base that you/we script the database creation etc & simplify
the process as much as poss - i.e. reduce support.

As a supporter of MySQL vs MS SQL (I use both) would be nice to see
some dedicated areas on many web sites to MySQL and ASP as its a
great product & not too complex. Gives the additional upsizing
dimension at far lower costs & not quite as mind-blowing to the
Access Database people out there as MSSQL.

From what I have seen there is very little out there except the
odd article or two.

Have fun - need anything else give us a shout."

Me:

WOW! Thanks Stuart.

______

Andrew:

"I realize you are quite busy with the new standard but I wanted
to drop you a line and praise your pageclasses.asp and the use of
them in your site.

<snip />

I first came across the need to look up the tutorial of
PageClasses.asp while trying to get some of the other tutorials
working.... They didn't because I was trying to run the javascript
as VBScript.

<snip />

I think there should be a link to the PageClasses.asp tutorial at
the begining of all articles. If there is one please excuse my
ignorance.

I'm following the progress with the new form submission standard.
The amount of traffic on that mailing list (ASPFSS) is amazing.

Also congrats on the results of the ASP Awards and thanks for the
site."

Me:

I bet many of you haven't even read that article - Andrew thinks
you should (me too - I wish my whole site was done like this, but
I had written too much by this point...)

http://CoverYourASP.com/PageClasses.asp

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

With all the work I'm doing on STORS and next ASP.NET, I've
decided to move this newsletter to a bi-weekly format.

That way I'll be able to have enough content to keep it
interesting!

Thanks Guys! Speak to you in two weeks.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

It's a Mad, Mad, Mad, Mad World!

I looked in my last newsletter and saw that last time I
wrote I was working on STORS.net - a site that was trying
to get a new standard for sharing web content off the
ground.

That seems so long ago.

Almost straight away it changed to STORS.org, a non-profit
organisation more fitting to a standards body. The web site
was going to go live on Monday May 14th - read later why
that's not going to happen now..

______


I did do some work that's directly beneficial to you too - I
finally got fed up having to enter the ID's of foreign keys
in my database admin pages. I've now improved them
dramatically by automatically showing dropdown lists when
one table has a relationship with another. Again, more below.

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

30 Apr
______

- Since I've been spending so much time on STORS lately, I've
decided to make my newsletter bi-weekly so that there will
be enough content to keep it interesting! So after the one
sent out this morning it will be two weeks before the next
one...

______

2 May
______

- For your information, STORS.net is now STORS.org. There is
now sample code available (in JavaScript of course!) for
both publishers and directories to start supporting the
STOR standard for sharing their resources.

______

3 May
______

- I found a new directory last night - http://Hytes.com - which
had been kind enough to add my banner to their ASP pages.
Check them out!

______

4 May
______

- Dave Kawliche was kind enough to link to CYA from his new
site - but he wanted a non-animated button. So there's now a
simpler button for you to use on the link page.

You should check out Dave's site, http://AccessHelp.net for
lots of interesting information.

______

9 May
______

- What a waste of an evening! My wife received one of "those"
emails today in her Outlook Express, and surprisingly the
preview pane executed the script!

I'm so used to my Outlook 2000 stopping me from doing
virtually anything with attachments that I assumed Express
did the same. Wrong! If you use Express, make sure you set
Tools/Options/Security/Restricted sites zone.

______

10 May
______

- Lovely email from "Steve Anderson" (no email address given),
it made me smile:

"If you're going to be a professional writer, you should learn
to spell 'independent'"

Who said anything about professional?!! Did he pay me
anything? I've fixed the single mistake needless to say. ;-)

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

STORS.org is dead, long live ASPRSS.com!
______

The last three weeks have seen a lot of changes - from FSS
to STORS, a new web site and a lot of interest from publishers
and directories alike. Now we're evolving again, this time to
use an existing XML standard, the Rich Site Summary (RSS).

Two people contacted us yesterday about RSS, and asked why
we were creating a new standard when an established one
already existed. Upon investigation we have to agree that RSS
has a lot of advantages.

RSS was originally conceived and implemented by Netscape to
provide a way for sites to create content channels - there
are literally thousands of sites that publish their content
this way.

It is apparent that there are very few ASP developers that
know about RSS, since it took three weeks for us to find out
about it, so we've decided to create an ASP-specific web site
to help the 1,000,000 ASP developers use RSS.

The new site is http://ASPRSS.com.

STORS.org will transform into ASPRSS.com over the next few
weeks. Its aims remain the same - to allow publishers and
directories to share links. We will still provide sample code,
this time less generic and more optimized for ASP sites.

ASPRSS will still keep a list of ASP sites that support RSS,
and will provide a form submission service for those sites.

In fact the new site will do a lot more than STORS.org was
ever planning.

To the publishers and directories that have pledged support
we hope you will continue to support ASPRSS. I'd like to thank
everyone for their enormous help in getting us this far - your
help was not wasted. Since RSS is extensible we will not lose
any of the ideas we have gathered so far.

I'd personally like to give special thanks to Steve Smith and
Pedro Pequeno for helping me get so far so quickly.

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

Got to be Conan Theobald who donated a significant amount
by upgrading his membership status to Silver*

Here's an email from him, which also helped make him this
weeks hero!

"I just read in your newsletter about how many people have
upgraded memberships; I believe this makes me number two! I
hope this "lack" of interest won't discourage you from
writing great articles. I liked to contribute all the same.

Oh, and check out the current site I'm working on:
http://www.365digital.com . It's got a lot to thank
CoverYourASP for. There are no CYA links in the source yet,
but that should be rectified soon, there is many a feature
not yet implemented and a lot of the "visual" code is FP
but hey-ho, such is the life of a developer :)

Have fun and happy coding!

P.S. I recommend www.activehost.com for fast hosting plus
free SSL pages!"

Thanks Conan!


*Note that there is nothing extra for silver members right
now, apart from my gratitude!
____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Do you use my database adminstration pages? If so, you'll
want to get the latest version from the download at
http://CoverYourASP.com/DownloadCYA.asp

I added code to store the foreign keys in Application
variables and display dropdown lists when viewing or editing
the relevant tables. It's very cool.

Ironically, it doesn't work at all on the CYA database,
because  of the assumptions it makes and my original bad
design of some of the tables!

So instead I've added three new tables: Cars, CarMakes and
CarColors to demonstrate the new code.

If you want to jump straight to the demo, go to
http://CoverYourASP.com/DBEditTable.asp?table=Cars

I haven't had time to document the changes yet, so I'll just
briefly describe them here.

First, a new function in utils/database.asp is called.
DBGatherForeignKeys( ) gets the foreign keys from the
database, looks up the data from the referenced table and
creates the HTML for a dropdown list. This HTML is stored in
an Application variable for later use.

***
Note: the dropdown list is populated with the second column
from the referenced table, so plan your tables accordingly.
***

There are two more new functions, DBDisplayValue( ) and
DBEditValue( ) that can be used to format the column for
display or editing, depending on the field type.

If the column has a corresponding dropdown list, then that
is displayed, otherwise the value is formatted into a date
or string format. Obviously these functions can easily be
modified to support other types.

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Joseph:

"Active Server Pages error 'ASP 0131'

Disallowed Parent Path

/cya/include/Startup.asp, line 20"

The Include file '/include/Config.html' cannot contain '..'
to indicate the parent directory. One other question - does
the global.asa have to be in the root directory?"

Me:

Here's your answer:

http://support.microsoft.com/support/kb/articles/Q226/4/74.ASP

And, yes, the global.asa has to be in the root, or I should
say, I haven't ever seen it anywhere else...

______

Jason:

"Can you help me with this strange error?

Microsoft JET Database Engine error '80040e14'

Syntax error in INSERT INTO statement.

  INSERT INTO eMsg (Name,MONTH,Message)
  VALUES ("' + Name + '","' + MNTH + '","' + Msg + '")

The form field message is a textarea (i'm trying to add a
message board to my page)"

Me:

(I've tried hard to get hold of Jason, but his email address
keeps bouncing...)

Try wrapping the field names in [ ] - month may be a
reserved name. Wrapping in [ ] allows you to use it.

Other possibilities include the fact that the values may
contain invalid characters such as ' - you should replace
any single ' with two of them.

______

Koh Sing: Can you do me a favour?

"Can you please teach me how to code an ASP vote poll
which users are NOT allow to vote it TWICE?"

Me:

Unless you have a membership system, you can't stop them
voting twice. You can make it hard, but never impossible.

Simplest is to use cookies, but they can be deleted. You
could use IP address, but many people will have the same
one if they go through a proxy or have dynamic IP.

Luckily I have a membership system you can use ;-)

http://CoverYourASP.com/MemberCode.asp

______

David Kennedy:

"My domain is hosted at an ISP When you connect to the
site you are forwarded to my Linux server. This forwarding
only works for the domain name.

I need a script that will forward addresses like
mysite.com/anypage.html, i.e. strip out the domain name and
append the rest of the URL to the address of  the Linux
server.

Is this possible to do from my home page or do I need
access to the Web server?"

Me:

Did you read http://CoverYourASP.com/404descr.asp and
http://CoverYourASP.com/HowIMoved.asp ?

The latter especially deals with exactly your situation.

David:

Thanks James, These files look like just what I need. Do
you have an example of calling an ASP function from a
default.htm file?

Me:

Sorry, you can't. You have to have a default.asp - just
rename your default.htm file, and add the function call
wrapped in <% %>

______

John Salonich:

"I'm responding to your article about render blocks. I
never realized how much of pain moving form ColfdFusion to
ASP would be. Tossing a <cfoutput></cfoutput> tag around
variables, the equivilant of <% %> is the norm, anywhere on
the page.

Of course there are always best practices and better ways
to build a widget, but I am truely blown away by all of the
hoops one needs to jump through to get similar functionality
to CF.

Don't take this as a Holy War, I think ASP is great, and I
thank you for maintaining this great web resource. I would
never have even explored ASP if I hadn't found your site.

Me:

Whoa - don't take my code as anything close to normal ASP!

No-one else I know does the same thing - everyone else has
HTML with lots of <% %>. So perhaps it's not so different
after all. I code like a C++ coder, not your typical web
developer.

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

Think of me next week. I'm moving house and will have to
disconnect my valued cable modem for up to 4 weeks!

I may switch to ADSL, but even that is a 7-10 day hookup.

So, I've dug out my old 56k modem and will install that this
weekend. I'm not looking forward to it!

Thanks Guys! Speak to you in two weeks.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

For the past five weeks I have been getting the site to send
me an email whenever someone fails to find anything with my
search (http://CoverYourASP.com/Search.asp)

I did this mainly to see if there was something new that I
should write about, and to prioritize new articles.

Surprisingly though, no subjects stand out, although the
sheer volume of failed searches was alarming at first! So
far 1221 searches have failed. Many were typos.

I'll work through the list whenever there's a spare moment
and resolve some of them to existing pages.

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

12 May
______

- Check out the improved database administration - now you
automatically get dropdown lists from foreign keys!

http://CoverYourASP.com/ForeignKeys.asp

______

13 May
______

- I apologize but I failed to update every file in the
download - so the include/config.asp was missing the new
bDisplayAllianceBanners variable. You would have seen an
error about this when running the site. The download is
fixed now.

http://CoverYourASP.com/DownloadCYA.asp

______

14 May
______

- As a follow-up to my "Accepting credit cards on your site"
article, I'd like to say how pleased I've been with
Charge.com. Just as I hoped, they have been remarkably
helpful and efficient.

I'd also like to thank those sites that have signed up
through my link - a cool $200 check turned up today for
two successful referrals!

http://CoverYourASP.com/CreditCards.asp
http://www.charge.com/banners/clicks.php?id=char1206

______

15 May
______

- ActiveServerPages.ca has had a major re-write, and very
kindly included a special "CoverYourASP" section
dedicated to my articles. Check them out!

http://ActiveServerPages.ca/

______

16 May
______

- It's moving day in the Shaw household, so I won't be
responding to any emails until Friday 18th - wish us luck!

______

18 May
______

- OK, I'm back. The new house is beautiful and there's even
something for you too - there is a new item on the
navigation bar above. "Directory" takes you to a huge list
of resources provided by Aspin.com!

http://CoverYourASP.Aspin.com/

______

22 May
______

- The Cable Guy gave me some bad news today - there is too
much signal drop over my 600 foot drive to get a cable
modem. So I have to use a dial-up connection for 2-4 weeks
while they prepare to dig up my drive.

Anyway, the good news for you is that I can now tell you
how to run my site with a dial up (I could never test it
before)!

When asked to "Connect" or "Stay offline", choose
"Connect". Then, when prompted to dial-up, choose
"Work offline".

It's a pain, but that's the only way to run ASP with a
dial-up. Or, of course, you could just stay online... ;-)

______

23 May
______

- Check out the new easy access to all of Aspin.com's
resources at the bottom of the front page. I've moved over
the ASPWire content to make room.

Now you never have to leave my site... ;-)

http://CoverYourASP.com/#news

______

25 May
______

- Do you have the Alexa toolbar installed? If you do,
beware. I did until recently but there is a side-effect
you should be aware of if you are a web developer.

If you upload pages to your server to test them and think
it's safe because they aren't linked to from anywhere -
think again.

The Alexa toolbar is listening, and will happily cache
your "private" file and crawl it whenever it fancies...
  
____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

As promised, I wrote a new article about foreign keys.

"Displaying foreign keys in your database as list boxes"

My original database administration tool didn't look for
foreign keys, and just displayed a confusing list of
primary key values. Now, it's been improved with
automatically generated list boxes...

http://CoverYourASP.com/ForeignKeys.asp

____________________________________________________________

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

                http://www.developersdex.com
____________________________________________________________


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 ActionJackson.com just to name a few.

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

                http://www.developersdex.com

____________________________________________________________

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

Robert Brooks is this weeks Hero of the Week. Robert sent me
an email related to calling Server Side Includes from a HTML
page, or more accurately a .shtm page. Following my reply to
David in the last newsletter, Robert prompted me again to
give the correct answer!

David:

"Thanks James, These files look like just what I
need. Do you have an example of calling an ASP function
from a default.htm file?"

Robert:

"Actually, that's exactly the situation I was describing in
the note I sent about the obscure configuration option that
prevents duplicate headers from being output from .shtm
files.  In case you (or he) is still interested, here's the
original message.  Feel free to forward it to him... with the
note that he must use a .shtm (server-parsed html) file.

- - - - -
I was going crazy trying to find the fix for this problem!  
Now that I've (or more accurately, my host has) found it, I
want to share it with you.

I got into ASP by hacking around the existing code for
KHYI.com.  The site was primarily HTML with #exec calls to
ASP routines.  So most of the files had .shtm extensions,
and had calls like this:

<!-- #exec cgi="/common/ad_station_khyi_ampsite_1021.html" -->

Everything was fine until we went to move to a new host. It
was crazy - everything worked fine except that every .shtm
file with a server side include had the HTTP headers
repeated in the text sent to the browser!

The new host (www.neologism.com) was a Linux house trying
Windows for the first time, so they were as stumped as I
was. And worse still, nothing on the 'net pointed to a
solution.

The most detailed fix was to find a way to wrap a meta-tag
around the unexpected text data - a most unsatisfactory
kluge.

To make things worse, the problem prevented "default.shtm"
from being the default page. This made no sense at all.

Finally, after poring over the IIS settings and manuals, the
new host's webmaster found the solution.  Here's the note he
sent me:

>Believe it or not, a checkbox labeled "buffering enable"
>needed to be unchecked to get rid of both the can't get
>default.shtm and the wonderful header message across the
>top of the screen. So we've overcome that now.

So there you have it -- my contribution to the world of ASP.  
To enable SSI in .shtm files, you have to find an obscure
checkbox and uncheck it. I hope you find this info helpful!

Feel free to direct folks to http://www.khyi.com to see my
100% ASP site in action.  All the .shtm files are actually
hiding calls to .asp modules - for example, the "jobs.shtm"
file is actually a call to something like this:
(munged for security):

<!-- #exec cgi="/textfile.asp?file=jobstuff.htm
      &title=Jobs+in+Radio&format=1
      &desc=<strong>Jobs+in+Radio</strong><br>
      <em>Be+part+of+the+action!</em>" -->

jobs.shtm looks a lot better in the URL bar than that mess,
and I don't have to reveal the inner workings of my site.

Sorry about the long message -- I know you've got plenty of
mail to read!  Good luck, and God bless.

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

Ever seen "Syntax error in FROM clause" on your local copy
of CoverYourASP?

Chances are that you're appending ?SECRET=1 to the URL (see
http://CoverYourASP.com/Security.asp ) and there's already a
? in the URL.

Here's an example:

http://CoverYourASP.com/DBEditTable.asp?table=Cars?SECRET=1

The correct way to append the password (or any subsequent
parameter to any QueryString) is of course like this, using
an & instead of a ?

http://CoverYourASP.com/DBEditTable.asp?table=Cars&SECRET=1

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Trent Collie:

"I'm still wet behind the ears when it comes to ASP but
viewing the source code from your site has helped a lot.
The only problem that I am having is I don't have CDONTS,
instead, I'm using ASPEMAIL. My question/problem is this,
where would I put "smtp.host.com" in the source code so that
it would recognize it?  Any help would be great. Thanks for
all the effort you've put into this for newbies like myself.  
Keep up the good work!"

Me:

My code sets the host to 'mail.yourdomain.com' - the
'yourdomain.com' is the sHostDomain set in include/config.asp.

But you can change the whole string to your 'smtp..' string
in utils/email.asp.

______

Tony O'Connell:

"Dear James, Firstly I would like to compliment you on your
brilliant website and code.

However, a friend of mine is setting up the software for me
and is running into a small problem. Our host (innerhost.com)
specifies that only files outside the web directory are
writeable. Therefore we have to store our database in
D:\Webs\one\data whereas our webpages are stored in
D:\Webs\one\www

Can you tell me which files to change so that we can point
to the access database in its new location?

We also have SQL setup. Is it very difficult to use SQL
instead of Access? If you have any documentation on this it
would be much appreciated."

Me:

Just change the connection string in include/config.asp.

The site will run from SQL if you change the sDBDriver in that
file too - but there are a few pages that use Jet-specific
SQL (like FIRST). But the vast majority is fine.

______

Allen:

"Hi James, Are you still running your site on an Access
database?  If so, do you know how many active users the
Access can support before taking up so many resources that
it slows down a shared server?

I'm asking this because I was told I may need to upgrade to
SQL 7.0 due to my load, but it seems you have more people on
your site than I do.

Thanks, and continue good luck with your site.

Me:

Yes, I'm still using Access 2000. No-one knows "the limit",
but my site seems fine with ~10,000 page views a day.

Make sure you use connection pooling - see the Hero of the
Week section in this old newsletter:

http://coveryourasp.com/Archives.asp?issue=18

____________________________________________________________

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

                http://www.visualasp.com/
____________________________________________________________

Download The VisualASP Component Pack v3.1 and start creating
fast, light weight 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 component.

                Download Version 3.1 Now.

                http://www.visualasp.com

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

Thanks Guys! Speak to you in two weeks.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

I heard a useful phrase this week that I think I'll be using
quite a lot in my replies to the many "How do I.." emails
that I get each day.

Very few relate to my site at all, and are questions that
can only way be answered by writing the code. To these
emails the following phrase can be applied!..

                   "It's a SMOP!"

SMOP stands for Simple Matter Of Programming! I usually
follow this up with a pointer to my two most recommended
books for developers new to ASP or JavaScript:

http://www.amazon.com/exec/obidos/ASIN/1565923928/qid=961363675/sr=1-1/shawthingcom
http://www.amazon.com/exec/obidos/ASIN/0672318636/qid=969150309/sr=1-11/shawthingcom

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

29 May
______

- A reader, J de Silva, published a kind review of me and my
site today - I took a look and was very impressed by his,
so you should check it out. I love the design - one to
watch.

http://j.desilva.tripod.com/

______

1 Jun
______

- Quite often I get emails like the one this afternoon
concerning email validation:

"Try [email protected] - you say it's ok but the domain and
  email don't exist."

WRONG! Simply typing http://www.fsf.com into a browser
doesn't test if the domain exists! Go to Hexillion's
validation page and enter that email address and you'll
see a conversation with the fsf.com mail server!

http://hexillion.com/samples/EmailDossier.asp

______

6 Jun
______

- Thanks Alalia! Seems Alalia Lundy got the honor of
GirlGeek of the Week from GirlGeeks.com - and then
listed CoverYourASP as one of her favorite sites.
Cool. ;-)

http://www.girlgeeks.com/innergeek/gkwk/gkwk.html

______

7 Jun
______

- For those of you following the progress of my new
site - ASPRSS, being launched on June 18th - I have now
published the source code that enables you to create
your own RSS XML file.

It is available in VBScript and JavaScript in this zip
file: http://asprss.com/Source/Publishers.zip
and documented here: http://asprss.com/CreateRSS.asp

______

8 Jun
______

- Like a good scare, or think you know this internet
stuff? You should read Steve Gibson's article on
grc.com about the Distributed Denial Of Service (DDOS)
attacks against him by a 13 year old.

It'll take you an hour to read, but afterwards you
might be surprised how little you know. I was.

http://grc.com/

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

No new articles this time, all my time has been spent on
ASPRSS. New articles will be appearing soon about code I've
written for that site - including submitting data to forms
on other sites using the superb IPWorks component from
nSoftware.

I've been using the free trial version of the beta Version 5
which is being released soon. I have to say I was amazed how
much functionality the package has. Most components do one
or two things well, this one does far more than I can list
here.

If you haven't checked it out yet go to their website at
http://www.nsoftware.com/ - everyone has a list of "extra
somethings" that they want to add to their site, but don't
because it's too much work.

These components make those hard enhancements trivial to
implement.

http://www.nsoftware.com/


____________________________________________________________

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

Ron Gines is this weeks Hero of the Week. Ron started by
sending this email:

"Thanks for putting your site together.  It has been a great
tool for me as I have taken a crash course in ASP and IIS
(I prefer Apache, Zope, etc. etc. etc. ...)

One of the first requirements for the client that I am
working with was to be able to use NT Authentication (using
NTLM and not Basic security).  I just got done experimenting
with adding this functionality and have gotten it to work
enough that I believe that I can start building a site around
it.

I've created two now pages and made mods to a handful of
others. I was wondering if you would be interested in seeing
the code.  I would have no problem with having you include
it in your distribution as long as all references to my
client were removed.  Giving me any credit would be up to
you. [James: Ron, everyone gets credit!]

I also want to use some of your toolset for multiple sites,
so I started moving some of the configuration information
down into global.asa so that gross site changes could be
made rather simply."

Following this email ron sent a zip file containing all his
changes, which I will look at following the launch of ASPRSS
on June 18th.

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

I made a small but useful enhancement to the database code
this week which I will add to the download soon - the
ability to pass in a recordset to the DBGetRecords( )
function as an optional parameter.

This comes in very handy when you need two recordsets open
at once, like I did on ASPRSS when writing the code to
automatically submit articles to directories:

   // connect to database
   DBInitConnection ( );

   // create recordset for subscribed publishers
   var oRSpub = Server.CreateObject( 'ADODB.Recordset' );

   // get a list of RSS publishers
   DBGetRecords ( 'SELECT SiteName,PublisherURL,ContactName,
      ContactEmail FROM Members WHERE Confirmed=True
      AND PublisherOnline=True AND MemberLevel>9', oRSpub );

   // create recordset for directories
   var oRSdir = Server.CreateObject( 'ADODB.Recordset' );

   // get a list of RSS directories
   DBGetRecords ( 'SELECT SiteName,DirectoryURL,ContactName,
      ContactEmail FROM Members WHERE Confirmed=True
      AND DirectoryOnline=True', oRSdir );

Not sending in a recordset will continue to fill in the
global recordset 'oRecordSet' as before.

Here's the simple change I made to DBGetRecords:

function DBGetRecords ( sSQL, oRS )
{
   // use default recordset if none given
   if ( oRS == undefined )
      oRS = oRecordSet;

   // if the Recordset is already open, close it
   DBReleaseRecords ( oRS );

   if ( oConnection )
      oRS.Open ( sSQL, oConnection, adOpenForwardOnly, adLockReadOnly );
}

and DBReleaseRecords:

function DBReleaseRecords ( oRS )
{
   // use default recordset if none given
   if ( oRS == undefined )
      oRS = oRecordSet;

   // Don't call Close if the Recordset failed to Open properly,
   // i.e. its State is still adStateClosed
   if ( oRS != undefined && oRS.State != adStateClosed )
      oRS.Close();
}

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Steve Smith: (of http://ASPAlliance.com/ )

"FYI, I just added the following error handler to your
ShowFile function that you may want to include in your
version.  It was bombing because I was passing it a
physical file path (which was all I had at the point
at which I was calling ShowFile).  Here's the fix to
handled both physical and virtual paths:"

function ShowFile ( oFSO, sFile, bPassHTML, bShowName, bLiveLinks )
{
var ForReading = 1;
// var ForWriting = 2;
// var ForAppending = 8;
var sPhysicalFilePath = '';

// open asp file for reading
try
{
    sPhysicalFilePath = Server.MapPath(sFile);
}
catch(e)
{
    sPhysicalFilePath = sFile;
}

var fFile = oFSO.OpenTextFile ( sPhysicalFilePath, ForReading );

Me:

Thanks Steve, good idea! Note that try..catch is only
available in JavaScript 5.5, so get the update from:

http://msdn.microsoft.com/isapi/gomscom.asp?TARGET=/msdownload/vbscript/scripting.asp

______

Koh:

"I met a problem while learning your site from my server.
I can't find the solution in your troubleshooting area,
Below is the problem:

Microsoft JET Database Engine error '80004005'
Selected collating sequence not supported by the
operating system.

Please help me to solve this. Thanks"

Me:

See http://support.microsoft.com/support/kb/articles/Q202/1/50.ASP

It looks as though your computer is using a language other
than English, so you need to install Multilanguage support
to access my database. The article above shows you how -
please let me know how you get on.

______

Peter  Boekelheide:

"I'm doing some database stuff with my webserver, but the
database is on a different computer than the webserver and
it would be very difficult to move it to there. When I try
to just map a drive, I get an error complaining

"The Path parameter for the MapPath method must be a
virtual path. A physical path was used."

Is there something I can do to get around this? Any help
would be GREATLY appreciated. Thanks."

Me:

My original answer was "Just don't use MapPath if you have
a physical path - just use the path itself. All MapPath
does is turn a virtual path into a physical one...", but
as Steve Smith pointed out above you can always catch the
exception in the code so you can use both...

______

Here's a problem that I'd like help with - if anyone has any
ideas why this is happening I'd appreciate knowing!

Basically when Stephane uses the DBEditRecord.asp page, it
shows some very strange behaviour when the enumerator is
used at the top of the page to get the data from the
QueryString.

Given this URL...

DBEditRecord.asp?table=Diary&DiaryID=82&secret=1

...the enumerator returns the following:

oItem = 'table'
Request.QueryString ( oItem ) = 'Diary'

oItem = 'secret'
Request.QueryString ( oItem ) = '1'

As you see, the DiaryID=82 is completely skipped! After
running a whole bunch of tests on the IIS5 machine I had
to throw up my arms! Why would this happen?

______

Sing Cheng:

"I met problems again when doing a guestbook. In the
TEXTAREA of my guestbook form, when i enter

  First line
  Second line
  Third line

then I submit my form and post the record into my
database. But when it display, it will display as

  First line Second line Third line

So, I am asking your help! Could you please tell me
how to Insert the line break code (<BR>) into each
line of the text in the TEXTAREA before it be
submitted into the datebase?

If you have plenty time, please do tell me how to
REMOVE HTML Tags before my text which with HTML tags
being submitted into the database.

Thank you very much and I will very appreciate your
help."

Me:

I haven't checked, but you probably want to replace
linefeeds with <br>, which you can do with this statement:

sStr = sStr.replace ( /\n/g, '<br>' );

To remove all HTML from a string, try this:

sStr = sStr.replace ( /<[^>]*>/g, '' );

______

Ivan:

"I have tried to make a new newsletter(copied one from the
download, renamed it with a new date, and uploaded it into
folder Newsletters!

BUT I don`t find a link as the 3 link there were in the
download ! Why ? Am I missing something? I have tried the
ASPlist and some asplists in DK, but I don`t get an answer
that I can use.

Please give me a hint. I also have read all your articles
on the issue, but i still don`t see what I am missing?

Keep up the good work!"

Me:

Ivan, I use Application variables A LOT to cache data from
the database and in this case, the folder Newsletters too!

You're right that it's not referenced in the newsletter
articles (my bad), but it IS documented in the article
about administering the application variables - see it
at http://CoverYourASP.com/ApplicationAdmin.asp

The short answer to your question is to run this:

  ResetNews.asp?SECRET=1

______

Conan:

"I have finally overhauled my companies site from FP
(boo,hiss!) to pure JScript ASP. You may like to take a
look (http://www.365digital.net ) and include it in your
Mini Me's perhaps? Just a thought... :-)

It also may interest you to know that the page "engine" is
OOP, as based on your article about Object Oriented
approaches to JScript:

http://CoverYourASP.com/Classes.asp

Oh, and have you ever realised:

  JS = JavaScript
  JS = James Shaw

Coincidence?"

Me:

hehehe! I added your site to the MiniMe page Conan.

Talking of FP, I came across another example of the cr*p it
produces last week. Just take a look at this, and figure out
which of the HTML is actually needed: (this is REAL!)

<TD width="44%"><!--mstheme--><font face="arial, Arial,
Helvetica"><!--mstheme--></font><!--msthemelist--><table
border="0" cellpadding="0" cellspacing="0" width="100%">
<!--msthemelist--><tr><td valign="baseline" width="42">
<img src="/_themes/ice36/36bullet.gif" width="24"
height="19" hspace="9" alt="bullet"></td><td valign="top"
width="100%"><!--mstheme--><font face="arial, Arial, Helvetica">
<STRONG><FONT size="3"><A href="/wordwrap/wordwrap.htm"
name="wordwrap">WordWrap</A></FONT></STRONG><!--mstheme-->
</font><!--msthemelist--></td></tr><!--msthemelist--></table>
<!--mstheme--><font face="arial, Arial, Helvetica">
<!--mstheme--></font></TD>

That's 679 bytes. Here is what it some *very simple* editing
will do, and there's much more to optimize..

<td width="44%"><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td valign="baseline"
width="42"><img src="/_themes/ice36/36bullet.gif"
width="24" height="19" hspace="9" alt="bullet"></td>
<td valign="top" width="100%"><font face="Arial, Helvetica"
size="3"><strong><a href="/wordwrap/wordwrap.htm"
name="wordwrap">WordWrap</a></strong></font></td></tr>
</table></td>

That's 405 bytes, or 60% of the original HTML...

______

Justin:

"Dear James, Just found your site today, and I must say
*supurb*, some very interesting articals, keep up the good
work.

I recieve an automated e-mail from one of my sites giving
me basic user information when the site is entered. One of
the snippets of information I recieve is the users browser
type.

In your article on 'hiding meta tags' your mention that
spiders don't generally use the name Mozilla; my sites
frequently get hit by (at least) one which does, below is
the full name string:

Mozilla/3.0 (Slurp/cat; [email protected]; http://www.inktomi.com/slurp.html)

Hope this helps. Much respect"

Me:

Thanks Justin. You're right of course, in fact the article
hasn't kept pace with the code as it's evolved. In fact
"slurp" is one of the keywords I look for when checking for
bots now. The current code says this:

function IsKnownBrowser ( sAgent )
{
    // check it's not an obvious spider/crawler first
    // (some of these are mozilla as well)
    if ( -1 != sAgent.indexOf ( 'spider' ) ||
            -1 != sAgent.indexOf ( 'crawler' ) ||
            -1 != sAgent.indexOf ( 'robot' ) ||
            -1 != sAgent.indexOf ( 'gulliver' ) ||
            -1 != sAgent.indexOf ( 'slurp' ) )
        return false;

    // it's well known if it contains mozilla (IE or Netscape) or opera
    if ( -1 != sAgent.indexOf ( 'mozilla' ) ||
            -1 != sAgent.indexOf ( 'opera' ) )
        return true;

    // don't recognize this agent
    return false;
}

______

Venakata:

"Hi James, Can you tell me where is the interface for
uploading the images for the ad system in your site? Can
you also give me a link where I can find the source code
for uploading the images and where and how are you
collecting the money from the advertisers who wanted to
advertise?

I appreciate any light you through regarding this."

Me:

In short, there isn't one! Advertisers don't come along
every day, and they haven't needed to change banners often,
so I just FTP them onto the site. I just haven't needed to
write the upload code, so I haven't!

As far as payment is concerned, it varies. Some send
checks, others pay through the credit card page as
documented on http://CoverYourASP.com/CreditCards.asp

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

Thanks for your patience while I finish up ASPRSS this week,
it's been a long while coming! First FSS, then STORS, but
finally I have a working system. Next time I want to save
my self a few hours a week I hope I remember this, and don't
spend over a month writing a brand new web site.

I think I could have manually submitted over 650 articles in
the same amount of time. ;-)

Thanks Guys! Speak to you in two weeks.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

After four weeks with a 31k dial-up connection ISP's are now
throwing their services upon me. My DSL application failed
for unspecified reasons, but now miraculously I received a
letter offering it to me: "it's now available in your area".

But after a lot of soul-searching,I'm sticking with cable,
which will be installed this week. I've heard all the
arguments about cable being a shared resource that gets worse
as your neighbors subscribe, but I'm not fooled that easily.

Even with DSL you're at the mercy of the ISP - no matter what
the service you'll always be sharing a line at some point.
Isn't the Internet one big shared line?

Anyway, fiber-optics sound more impressive!

____________________________________________________________


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

                http://www.nsoftware.com/
____________________________________________________________


IP*Works! V5 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
more.  

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

13 Jun
______

- So many have asked recently where to get the download from
that I've added it to the navigation bar at the top of
every page. The Bookmark function got moved to the footer.

______

14 Jun
______

- In a flash of inspiration today I thought of a way to make
the site "appear" to be quicker. The problem started when I
started showing banners served from the ASP Alliance Ad
Consortium of which I'm a member. Because they were served
from client-side JavaScript it meant that although the pages
still took the same time to render, they appeared much
slower. This is because the table's don't render until they
know how big the result from the JavaScript is going to be.

Now, however, I wrap the JavaScript in an iframe, which has
a width/height attribute. Hey Presto - the tables can now
render immediately, without waiting for the image to download!

______

15 Jun
______

- This is very impressive, and a lot of fun... Powers of Ten.
Thanks to Clint Lewis for the link to Science, Optics and
You in his angryCoder column this morning.

http://micro.magnet.fsu.edu/primer/java/scienceopticsu/powersof10/
http://www.angrycoder.com/author_bio.aspx?aid=6

______

18 Jun
______

- Thanks to Paul Hanly who wrote to me today pointing out
that because the download is more than a month old, no diary
entries are shown! So I've updated the download to include
all the latest diary entries, and refreshed all the code.

______

19 Jun
______

- Nothing to do with ASP, but today I consider myself "the
luckiest man man man on the face of the Earth", as Lou
Gehrig would say.

My wife got tired of spending $100 to get her hair
highlighted, so she bought a $10 hair coloring kit and then
made me apply it. Can you spell S-T-R-E-S-S? Luckily after
the second application (it was CYA orange after the first
one) it turned out fine, but let me tell you: even if they
beg DON'T ever do it.

http://real.frozenzone.com:7070/ramgen/bucs/gehrig.rm
______

20 Jun
______

- Motto: Don't program at 2am. Repeat as often as necessary.
I just trashed my database, and will have to restore it from
backups tomorrow and merge them in. Sorry for the
inconvenience if you were a witness...or heaven-forbid were
lost in the scramble.

______

21 Jun
______

- Please remember that even though the feedback page says that
your email address is optional, you must supply it if you
want an answer from me!

Sounds obvious, but today I'd typed a reply and sent it before
I noticed the return email address was empty. "George", having
problems with running the downloaded site under IE 6, can you
contact me?

______

22 Jun
______

- I took a quick visit over to MaximumASP yesterday after their
new ad (top right) appeared. Yeah, I know they're an
advertiser, but their web site is truly one of the best
designed, prettiest sites I've seen since GotDotNet. The Cool
Focus gadgets they use look cool too.

http://ads.aspalliance.com/adredir.asp?id=61&m=6
http://gotdotnet.com/

Anyway I'm feeling inspired to do a complete re-design...

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

Two new articles this time:

"Submitting data to a form with IP*Works! WebForm"

ASPRSS has a subscription service that automatically submits
articles to all the ASP directories out there. See how I
submit the data to their forms using the IP*Works! WebForm
component

http://CoverYourASP.com/FormSubmit.asp

"IFRAME's...and IE 5.5"

Sometimes IFRAME's can solve a big problem, but their
interaction with IE 5.5 is something you need to know about -
it's totally bizarre!

http://CoverYourASP.com/iframe.asp

____________________________________________________________

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

Paul Hanly is easily this weeks Hero. After discovering the
site I have a constant stream of very insightful suggestions
and tips. Some more follow in the feedback section, but
here's one that could be fun to play with:

"Some users who are hobbiests may wish to use PWS on a port
other than 80 in combination with a domain name from
http://www.dns2go.com so they can show off their ASP pages
to friends without having to buy hosting which caters for
ASP and Access or SQL.

The port on PWS can be changed:
1. First Stop PWS or at RUN type C:\WINDOWS\SYSTEM\inetsrv\pws.exe /stop
    [If PWS is running it the change may not take effect]
2. At a DOS prompt type the following
    [Location of mdutil.exe]  C:\mdutil.exe SET W3SVC/1/Serverbindings ":8080:"
3. Start PWS or at RUN type C:\WINDOWS\SYSTEM\inetsrv\inetinfo.exe -e w3svc
4. In webbrowser type http://localhost:8080 to verify change
    to port 8080
5. You may or may not have to restart your computer for the \
    change to take affect.

(This is from Harley on the microsoft.public.win98.pws4
newsgroup)

Some of the ramifications are:

1. the PWS website button doesn't work
2. the PWS publish button doesn't work
3. relative URLs seem not to work because they are based on
    http://localhost rather than on http://localhost:8080

To fix the relative urls I changed line 180 in init.asp to:

  sBaseServer += '/8080/' + sURLOffset [ i ];

by inserting the :8080 in front of the /.

This stuff might be a bit sensitive because one reason that
people may wish to change their port on pws to other than 80
is because their ISP has it blocked and they may wish to
check their terms of service to ensure that they aren't
breaching them.

When registering for dns2go they would use the new port
number on the registration form if they are advised that
port 80 is blocked when they try to register using port 80.

If they try using port 80 and don't get the message it is
blocked then they probably don't need to change the port.

You can probably express all this a lot better than I can
if you decide to use it. [No I can't! James]

No need for reply or acknowledgement. [Too late! James]

Just sent for what it's worth as an appreciation of the
free download."

Thanks again Paul.

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

I was a little sad to hear that the first site to publish an
article of mine, "way back" in June 2000, is looking for a
new owner. ASPcode.com was the first site I found that
accepted links to articles - I remember being very excited
by the idea!

At the time my articles were written on my home page at
http://ShawThing.com/ and I was getting 20 visitors a day.
Publishing at ASPcode.com immediately made it jump to a
dizzying 200 visitors and 1,000 page views a day!

A recent talk with Editor Chris Duke revealed the sad news:
"We are overwhelmed with other projects and are interested
in pursuing the sale of the site.".

So, if anyone is interested in taking over the (IMHO) very
cool site, contact [email protected]

http://ASPcode.com/

(But be sensible! Please don't contact them unless you are
serious.)

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Andreas Warberg:

"I don�t know whether Microsoft is to blame or not, but
with IE6 build 2479 your site�s fonts are way too small.
Probably just a Microbug, but I thought you might want to
know."

Me:

Luckily I've stayed away from IE6 so far. I've heard nothing
but bad things, so I'm not even going to install it. Thanks
for sending me the screen capture Andreas - it has certainly
rendered my site incorrectly in a number of ways.

______

George:

"I downloaded your excellent site but I have difficulties
running it. The first page opens ok, but when I try most of
the front page links, they don't open and finally I receive
the message "too many users connected" - which of course is
not true. Do you have any ideas?"

Me:

[George didn't include his email, so I never got answers
  to my questions below...]

What does happen when you click a link? nothing? which ones
do work?

The site is set up by default to run from
http://localhost/cya - is that where you run it? If not look
at http://coveryourasp.com/downloadconfig.asp and
http://coveryourasp.com/basehref.asp to change the arrays at
the bottom of include/config.asp

______

Paul Hanly:

"Hi James, Thanks for the acknowledgement re the diary.

A suggestion if I may.

On http://www.coveryourasp.com/PWS.asp I suggest you put a
link to troubleshooting under the heading re Installing from
Windows 98 CD so that people can fix the problem at the start
as if they keep getting the error messages they may never
progress far enough in the site to get to the troubleshooting
link!

I assume that (tens of) thousands of win98 cd's have the same
problem, so amy as well fix it up front."

Me:

That would be a good idea - I'd never thought of actually
helping people *not* get the problem in advance!

______

John Timar:

"First, thanks for all the information available at your
site.  I have inherited an environment I am not very familiar
with, and the more reading and REAL examples I can find,
the better I can do my job.

Second, a minor nit. I originally found your site because I
was looking for a way to validate email addresses. Your page
came up and I tested a few addresses that I had and found
that a trailing blank (e.g. "[email protected] ") will
throw off your test - this is a valid DNS entry and email
address.

Thanks again for the info!"

Me:

First I replied:

Thanks for the tip - I'll make sure they're trimmed first!

But, then...

Actually John, now I've investigated, I'm not sure I will
change it. My ValidateEmail.asp page calls a function in
utils/email.asp called GetEmailRating and accepts a single
email address.

Having leading or trailing spaces causes the syntax check
to fail, and I'm not convinced that's wrong. Well, let's
be honest, I think that's right, and I'm sure you do too.

However, readers should be protected from typos and
copy/paste errors that may leave stray spaces. In fact my
code copes with it perfectly in "real" use.

My feedback form (and every other real use of email) calls
the higher level function IsValidEmail, and this function
accepts multiple addresses separated by ;: and you guessed
it, spaces.

So if you pass "   [email protected]    [email protected] ;  :  [email protected]" into
IsValidEmail or SendEmail they will split the string into
[email protected], [email protected] and [email protected] with no spaces and work
perfectly.

Does this make sense? If anything, I may change
ValidateEmail.asp (the only page that fails) so that it
trims the form inputs first.

______

Conan:

"You might want to check the syntax of your ROBOTS.TXT
file at http://www.tardis.ed.ac.uk/~sxw/robots/check/

;-)

I've just discovered how to make one myself (after being
bombarded with emails by my new 404.asp page, damn
spiders), and I found this syntax checker -- Maybe it's
out of date for current agents, but its good to be
backward compatible, no?"

Me:

Excellent resource Conan, thanks. I found 2 or 3 "errors"
and even if they didn't cause any real problems it's always
handy to know the rules!

______

Kevin:

"Hi James, I was wondering when you were going to publish
the article on how you used paypal to upgrade membership.  

I am interested in using the code on my site and hope to
set up a subscription (members only) area."

Me:

Actually, paypal still don't support an automatic way of
doing it. I've bugged them for months, but they are a little
slow!

PayPal has a serious flaw, in that anyone can grab the html
of my webaccept button, modify the payment amount and submit
it. Although that'll show up in the confirmation email I get,
they don't pass the information onto the "Thanks" page.

There is also no way of knowing if PayPal even called the
Thanks page, or if a customer called it directly!

So, the end result is that you cannot do anything "automatic"
in the Thanks page of a real site trying to sell goods.

For my new site, I've had to go to a manual process. See
http://ASPRSS.com/MemberUpgrade.asp - and once I get an
email saying they've paid I hop onto the database and
upgrade the membership.

____________________________________________________________

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

     http://www.hexillion.com/refer.asp?id=cya7&dest=%2F
____________________________________________________________


Get FREE sample code, online utilities, and articles at
Hexillion.

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.

http://www.hexillion.com/refer.asp?id=cya7&dest=%2F

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

BTW, did you know that I've now been doing this for a year?

I didn't realize until I spoke to ASPcode, and that reminded
when I first posted my first article - June 2000. Man, a lot
has happened since then.

To celebrate, and to reward anyone who's read this far, I
pulled my finger out this weekend and completely changed the
look of the site! As I write this I haven't uploaded it yet,
but it'll be up sometime on Monday. Surprisingly it's only
taken 5 hours so far, including making the graphics.

Hope you like it. ;-)

Thanks Guys! Speak to you in two weeks.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

Since the last newsletter the site has changed a little! The
new look seems to be a success - you all stay on the site a
little longer which is nice!


Improvements to the search have obviously worked too - the
emails from the site detailing the failed searches have been
cut in half. So if you tried the search before and weren't
impressed, try again. ;-)

Oh, let's not forget that I have my cable modem installed
now - and faster than ever thanks to being plumbed directly
into the main line (no sharing with the neighbors!).

<STOP_PRESS>
I apologize if this email gets to you late, or you failed to
get to the site in the last few days. Too many things to list
have gone wrong in the last 48 hours - so the site and mail
server has been offline a lot since Friday evening.

"Normal service will be resumed as soon as possible.
Thank you"
</STOP_PRESS>

____________________________________________________________

                    T H E   D I A R Y

               The events of the last week

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________

______

25 Jun
______

- To celebrate doing this for a year I had a little re-design
this weekend (as if you didn't notice). I have yet to go
through every page though, so I suspect you may see a few
that need tweaking! Hope you like it...[1]

Note: The download has not been updated with this code - I'll
post here when that's done.

[1] http://CoverYourASP.com/

______

26 Jun
______

- I made an obvious improvement to the search[1] yesterday -
should have thought of it before! Now I first search the
database for ALL the words you type, then I search again for
ANY of the words.

The former is likely to give a very short, accurate list,
but the latter will usually find something when obscure
phrases are searched for.

[1] http://CoverYourASP.com/Search.asp

- Can this be true? I'm as pro-MS as it's possible to be,
but I don't like this smart-tags idea[1] as it's described
here!

[1] http://www.zdnet.com/intweek/stories/columns/0,4164,2772297,00.html

[note: this functionality was later removed by MS]

______

27 Jun
______

- Continuing the improvement of the site appearance (and
after being given a needed push by Minella Gjoka!) I've
added something else that I always wanted - a "Printer-friendly
page"[1] option that shows nothing but plain-jane content -
find it on the left of the screen.

I'm still amazed how easy it is to add this type of thing...

[1] http://CoverYourASP.com/default.asp?plain

______

29 Jun
______

- I'm glad I had 3 copies of Interactive Week to read last
night - I installed the .NET Beta 2, or at least tried to.

  � Uninstalling Beta 1: 1 hour
  � Installing Component Update: 1.5 hours
  � Installing Visual Studio.NET: 1.5 hours until I hit a
    bad file on my CD.

This is HUGE! I shall burn a new CD tonight which will
hopefully let me continue (my machine is patiently sitting
at home, saying "Error reading file, Retry?", waiting for
my return tonight).

______

30 Jun
______

- I think I have .NET Beta 2 installed now, but I haven't
had the nerve to run anything yet. I had quite a few weird
and wonderful errors, and another 4 hours of installation,
but it'll be worth it! I have a week off now, so maybe I'll
get as far as "Hello World"...

- I can't remember if I've told you about HitBox Doctor[1]
before - but if you're serious about your website you need
to visit. They check for broken links, bad HTML, load time
and meta tags - and have a built-in image reducer. It's all
free!

I use it regularly - in fact I cut out over 5k from my front
page by running the new logo and table graphics through their
optimization!

[1] http://resources.hitbox.com/cgi-bin/page.cgi?tools/doc

______

2 Jul
______

- New site source code uploaded! I'm happy enough with the
new layout to update the download[1]. I've made a few changes
to improve matters on NS 4.7 and Opera 4, but since 96% of
you use IE (on my site), that's good enough for me. Have fun!

[1] http://CoverYourASP.com/DownloadCYA.asp

______

4 Jul
______

- Happy 4th July! I have to keep my head down at the local
parade (I'm English, remember?) but the kids are really
looking forward to it...

______

6 Jul
______

- It's a big red-letter day today - I start work (finally)
on CoverYourASP.NET! I have a day off, the wife and kids are
visiting friends. The Cable Guy is coming this morning too
to install my cable modem in my new house after a long wait,
so it's all coming together at long last. Ready, Set, Go!

______

7 Jul
______

- I'm so pleased with ASP.NET! Users familiar with my code
will be too - since it just continues on from what I do with
no render blocks[1] and classes[2] for everything. It'll be
a while before you see anything because I have to create the
site and page structure first, but I'm working on it...

[1] http://CoverYourASP.com/DontRender.asp
[2] http://CoverYourASP.com/Classes.asp

______

10 Jul
______

- Ooops! I awoke this morning with a nasty feeling that I'd
forgotten something, so I checked the site. Sure enough I
completely forgot that I was due to publish a newsletter last
weekend. Sorry.

______

12 Jul
______

- I finally started to replace my tacky banners - there's a
new 468x60 one on my "link to me" page[1] if anyone needs to
update their links. Thanks.

[1] http://CoverYourASP.com/LinkToUs.asp

- My parents are flying into Atlanta tonight to stay with us
for a few weeks - just warning you that email responses may
be a little "sluggish" for a couple of days. =;-)

______

13 Jul
______

- Planning is continuing for the planned sister site to this
one - CoverYourASP.NET. I am writing it in C# - an
exceptional language.

To follow along I whole-heartedly recommend that you get this
book[1]. It has already jumped to the top of my "favorite
books" list: Inside C# by Tom Archer.

[1] http://www.amazon.com/exec/obidos/ASIN/0735612889/shawthingcom

______

14 Jul
______

- New banners and buttons[1] to link to me are now available.

[1] http://CoverYourASP.com/LinkToUs.asp

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

With all the changes, there was just one new article:

"Displaying printer-friendly pages"

A few lines of code is all it takes to implement a
printer-friendly version of all your pages. Make all those
pesky navigation bars and banners disappear!

http://CoverYourASP.com/PrinterFriendly.asp

____________________________________________________________

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

Robert de Jongh is this weeks hero, for joining the developers
who so kindly give back the modifications to my code so I can
share them with you. Robert's change adds support for running
the site on an HTTPS secure connection:

"As you will see it's an addition to the SetBaseHref function
found in utils/Init.asp: Thanks for all the code and sharing
it"

var sRootHTTP = 'http://'
var sRootHTTPS = 'https://'

var sRoot = Request.ServerVariables ( "HTTPS" );

function SetBaseHref ( )
{
    var sProtocol;

    if ( sRoot == "on" )
       sProtocol = sRootHTTPS;
    else
       sProtocol = sRootHTTP;

    var sBaseServer = sProtocol + sServer;

    // test which URL I am running from
    for ( var i=0; i<sURLTest.length; i++ )
    {
       if ( -1 != sBaseServer.indexOf ( sURLTest [ i ] ) )
       {
          // apply the offset if one given
          if ( sURLOffset [ i ].length )
             sBaseServer += '/' + sURLOffset [ i ];
          break;
       }
    }

    Out ( '<base href="' + sBaseServer + '/" target="_top">' );
}

____________________________________________________________

               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.

                  http://EverPlanet.com/
____________________________________________________________

A story you may have heard before, with a slightly different
ending...

A philosophy professor stood before his class and had some
items in front of him. When the class began, silently he
picked up a large empty mayonnaise jar and proceeded to fill
it with rocks; each about 2" in diameter. He then asked the
students if the jar was full? They agreed that it was. So
the professor then picked up a box of pebbles and poured them
into the jar.

He shook the jar lightly. The pebbles, of course, rolled into
the open areas between the rocks. He then asked the students
again if the jar was full.

They again agreed it was. The professor picked up a box of
sand and poured it into the jar.Of course, the sand filled up
everything else. "Now," said the professor, "I want you to
recognize that this is your life. The rocks are the important
things - your family, your partner,your health, your children
- things that if everything else was lost and only they
remained, your life would still be full. The pebbles are the
other things that matter like your job, your house, your car.
The sand is everything else. The small stuff." "If you put the
sand into the jar first, there is no room for the pebbles or
the rocks. The same goes for your life. If you spend all your
time and energy on the small stuff, you will never have room
for the things that are important to you.

Pay attention to the things that are critical to your happiness.
Play with your children. Take time to get medical checkups.
Take your partner out dancing. There will always be time to go
to work, clean the house, give a dinner party and fix the
disposal." "Take care of the rocks first - the things that
really matter. Set your priorities. The rest is just sand."

But then... A student then took the jar which the other
students and the professor agreed was full, and proceeded to
pour in a glass of beer. Of course the beer filled the
remaining spaces within the jar making the jar truly full.

The moral of this tale is:  no matter how full your life is,
there is always room for <homer_voice>BEER</homer_voice>.

____________________________________________________________

                     F E E D B A C K

            Have something to say? Please share!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

Neil J. McLeish:

"Hi James. Just read your article on iframes.

Re the para:
===snip===
It gets stranger! The files being requested were the
<title> of the page containing the IFRAME, with
"/_files/iframe.htm" appended. So, this page, which has a
title of "IFRAME's...and IE 5.5", would cause my server to
get a request for a file called:
===end snip===

I can only guess but could this be IE pre-translating the
file paths for the eventuality that the user will choose
menu file|save as?

Doing a save as web page (complete) on your page will
give an html file called: IFRAME's___and IE 5_5.htm and a
folder called IFRAME's___and IE 5_5_files.  In this folder
we have the image files and 6 iframe files:

iframe.htm..iframe(6).htm.  

Each of these iframe(N).htm files has its own iframe(N)_files
folder containing a file called displayad.htm.

I have a feeling that the browser developers have attempted
to prepare for all of thoses eventualities which may or may
not occur.  It would appear the the browser is renaming the
temporary file 'just in case' the user wants to save it.

If my guess is correct (or even near the mark ;) ) then I
believe it is a particularly stupid 'feature' as it will
inevitably end up being a cause of many a problem for
developers.

But I could be wrong."

Me:

Like I said, bizarre!
______

Dean:

"Just like to say i think this is a brilliant resource.  I
first came across it just after it was first live on the web,
but hadn't visited for a while, only to come across it again
whilst sorting out my favourites, glad i checked it out again ;]

I've downloaded the site and starting messing with the files.  
I've had some experience with ASP before, but not that great,
and everytime i come across a problem you have seemed to have
an answer!  can't believe it.

anyway the main reason for dropping this mail is i have a
question about membership services.  I've seen an article on
webpage templates on asp101 and i was wondering whether it is
possible to integrate this within the site, so basically, a
user could choose colours,fonts,logo's etc on the site and be
stored as part of the membership.

i'm sure it would be really easily to implement, but i can't
quite figure it.  am i right, would it be fairly simple?  I'm
not expecting you to do this but if you could point me in the
right direction it would be helpful.

Me:

Oh yes, that's easy (and I love seeing the English spelling of
colour again). In fact I do store some personalization for the
front page in the member records. Just search for bIntro as an
example.

To extend it, just copy the code you find and add a Color
to the database, or whatever.
______

jfSebastian:

"As I was looking at the codes from the cover your asp
site that I've downloaded, to understand how it works, I
was thinking about how do you organize all the files that
are called such as config.asp, startup.asp, etc. to be
shown on the webpage, you know?

I mean, when you open the page it's all organized, banners
at the left, news at the center, etc. but when you take a
look at the code itself to see how it's done, you realize
that all it has is calls to certain files like header,
footer, content, and so one.

But looking at it you don't see how it's done in order to
appear on the site at determined places. Am I getting too
complicated? Got my point?

You don't specify where each item will appear and how it
will appear on the page, and that's what I want to know
how is done."

Me:

Well,looking in Header() you�ll see that it uses tables to
place the content in cells around the page, then content()
puts content into a cell, and finally ShowAds() is called to
fill the last cell. The site is just one big table, and that
is what controls the positioning.

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

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

Lots of new things coming too - I've negotiated a job board
that will appear on the site very soon so you can all find
that dream job; getting paid for doing what you enjoy!

Also, Ryan at http://FuzzySoftware.com (a cool directory site
linking to *everything*) is hoping to have a small presence
on the site so he can share his news.

All of this extra content will be customizable of course via
your membership, so it just means more choices for you.

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?

            http://CoverYourASP.com/Subscribe.asp
________________________________________________________________________________________________________________________

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

             Welcome to the latest newsletter!

                 http://CoverYourASP.com/
____________________________________________________________

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 DeveloperNetworks.com
http://jobs.CoverYourASP.com/ 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 http://www.cafepress.com/CoverYourASP/

Last but definitely not least Charles Carroll of
http://LearnASP.com and http://ASPlists.com/ 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

                http://www.nsoftware.com/
____________________________________________________________


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

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

                http://www.nsoftware.com/

____________________________________________________________

                    T H E   D I A R Y

               The events of the last 2 weeks

            http://CoverYourASP.com/ShowDiary.asp
____________________________________________________________
______

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:

http://CoverYourASP.com/default.asp?ShowIE6

______

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

[1] http://www.cafepress.com/CoverYourASP/

______

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

[1] http://www.aspusergroup.com/atlanta/index.asp

______

25 Jul
______

- I'm proud to announce a huge new section on CoverYourASP -
jobs[1]!

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

[1] http://jobs.CoverYourASP.com/

____________________________________________________________


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

                http://www.WebServerList.com
____________________________________________________________


                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 http://www.WebServerList.com

____________________________________________________________

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

Steve Gibson of http://grc.com/ 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, buy.com 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.

[1] http://grc.com/dos/intro.htm
[2] https://grc.com/x/ne.dll?bh0bkyd2
[3] http://zonealarm.com/
[4] http://www.us.buy.com/retail/computers/product.asp?sku=10235958&loc=219

____________________________________________________________

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

        Please recommend my site to your colleagues

           http://CoverYourASP.com/Recommend.asp
____________________________________________________________

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 http://asplists.com/ !

______

To subscribe/unsubscribe from the list, visit:

  http://asplists.com/asplists/aspcya.asp
______

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.

                  http://EverPlanet.com/
____________________________________________________________

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

Whether you want to host a little site like my friends cute
http://BuggyBagg.com/ 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!

            http://CoverYourASP.com/Contact.asp

____________________________________________________________

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

Me:

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:  
http://www.adopenstatic.com/experiments/stringconcantenation.asp

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
http://www.hitbox.com as the site to check..."

[1] http://resources.hitbox.com/cgi-bin/page.cgi?tools/doc

Me:

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"

Me:

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

C:\Inetpub\Wwwroot\

would return

C:\Inetpub\Wwwroot\images\hello.gif

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

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

______

Conan:

"...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
webmaster!"

Me:

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

[1] http://CoverYourASP.com/Application.asp

______

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):

http://nsa2.www.conxion.com/win2k/download.htm - Guides from the
NSA for securing Win2K, IIS, and other MS software. Good stuff.

http://www.microsoft.com/technet/security/notify.asp - site to
subscribe to Microsoft's Security Notification Service...one way
to keep up with when you need to install patches.

http://www.microsoft.com/technet/security/tools.asp - 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).

http://www.microsoft.com/technet/security/iis5chk.asp - IIS 5
Security Checklist. Great doc for what you need to do to secure
IIS.

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

______

Abdel:

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

Me:

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

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

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

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
returned:

  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... =;-)

______

Chuck:

"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?"

Me:

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

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

[1] http://CoverYourASP.com/CYA.asp

______

Abdel:

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

Me:

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

http://msdn.microsoft.com/scripting/jscript/doc/jsobjdate.htm

____________________________________________________________

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

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

            http://CoverYourASP.com/Donate.asp

         ===> 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?

            http://CoverYourASP.com/Subscribe.asp
____________________________________________________________

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?


Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!


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


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!