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