ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 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
70 active users
441 visitors today
428 pages today
(only part of today)
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

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

ASP.NET Blog
ASPRSS
ShawThing

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

james@CoverYourASP.com

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

james@CoverYourASP.com

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

james@CoverYourASP.com

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

james@CoverYourASP.com

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: test@coveryourasp.com
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.asp?prodID=123" 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.asp"-->
<!--#include file = "utils/Database.asp"-->

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

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

var sURL = 'sorry.asp';    // 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

james@CoverYourASP.com

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

james@CoverYourASP.com

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