Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  advice: Error Trapping Strategies
     [next Lesson]  Appendix A: Overview of ASP Objects

ASP Commandments: Shoulds

Thou should:

  • specify all of the parameters for their ADO command, connection, and recordset objects so defaults don't rear their ugly heads and give thou an error when thou tries to do something which isn't permitted by a default (e.g. .AddNew after using defaults, creating a read-only recordset, and the inevitable resulting error).
  • make sure that ASP scripts that are dynamic in nature have caching turned off. Thou shalt find scripts and caching are like oil and water...they mix not well, except on salads. If caching isn't turned off by default, it should be possible to alter a single variable in each script file so caching can be switched on/off at will to avoid retrofitting scripts with the code required to break caching.
    /freebook/asp/cachenomore.aspx has up to date guidelines on how to disable script caching.
  • remember using .Execute to create an ADO recordset will result in a read-only recordset and thou can neither edit these records nor add new records.
  • Use the correct cursortype or a SQL count to determine how many records are in a table or query, instead of a counting loop or a movelast.
    see /freebook/asp/dbcount.aspx   for an example.

Should: Ought to, but not necessarily will.

Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site