[color=blue]
> Where do you put code, ect...?[/color]
- Option Explicit is the first thing after the language declaration
- Pre-processing code - getting the data from the database; updates;
inserts; deletes all go above the <HTML> tag, so redirecting is not an issue
when the db work is done.
- Presentation - that is, everything the user sees after getting the data -
goes between the <HTML>of course</HTML>.
- All javascript validations and instructions are collected into an array
and output as the last thing before the </HTML> tag. I have another post on
this subject, earlier in this group.
- Subs and functions local to the page go after the </HTML> tag.
- Subs and functions used throughout the app go into other files, such as
stringFunctions.asp, sqlFunctions.asp, etc etc etc, and are included as
needed immediately after the Option Explicit line.
- Because we specify IE5.5 as a minimum standard for our application,
behaviors are used whenever possible to limit the amount of code written in
every page.
[color=blue]
> - How do you access the db? Do you have customized classes for accessing[/color]
the[color=blue]
> data, retrieving recordsets?[/color]
Customized classes? No. Wrapper functions? Yes. For instance,
GetRs conn, rs, sSQL, "[Somepage.asp].[Function1] Getting employee data<p>"
& sSQL
- creates the connection if conn.state <> 1
- creates the recordset if rs is not an object
- redirects to an "Oops" page if rs.state <> 1, displaying the error
message shown in the last parameter
CreateConnection objConnection:=conn, UseShape:=false
- accepts a connection object
- gets connection string for shape queries if true, vanilla OLEDB if false
- redirects to an "Oops" page if conn.state <> 1, displaying the error
message built from the connection's errors collection
[color=blue]
> - Do you have any datagrid class for displaying/editing/sorting data?[/color]
No.
[color=blue]
> - Do you store db connections as an application variable?[/color]
NO. NEVER. NOT EVER. ON PAIN OF DEATH. OR JUST PAIN. Let me be
completely unambiguous: NO.
[color=blue]
> - Some links to useful components (preferably free!)[/color]
JMail.
http://www.dimac.net. Beats the hell out of CDONTS.
- Wm "agressively lazy" Morris
--
William Morris
Product Development, Seritas LLC