G. Marston (Your ASP Associate)

Home

Email

Download File

See Demo

README.HTM for ASP-DataAdmin 1.1

Contents

Requirements
How to setup on your website
Data Admin Login
Additional setup options
Global variable definitions
History - Enhancements/Bugs
Naming Conventions
Creating a child web

Requirements

NT/IIS or Win 2000/IIS on the server
Any web browser software on the client
MS Access on a local computer (optional)

IMPORTANT: DataAdmin will only work with Access database files which have at least one "auto increment" field. This field is used to create the link for each record. Most Access files have this field so it should not be a problem. However, if this field does not exist then you will not be able to edit any records for that database.

How to setup on your website

1. download the file ADMIN11.ZIP from the website
2. unzip the file ADMIN11.ZIP. The following files should be included:

README.HTM
ADMILOGI.ASP
DATALIST.ASP
EDITRECO.ASP
EDITRESU.ASP
LOGIRESU.ASP
COMMFUNC.ASP
GLOBVARS.ASP
DATAADMI.MDB

3. create a new folder on your website for the .ASP pages (i.e. "/dadmin")
4. upload all the *.ASP files to this new folder
5. create a child web (see below) using frontpage. This child web will be used to store the database DATAADMI.MDB. This also could be use to store other site databases if you wish.
6. upload DATAADMI.MDB to the "_private" folder of this new child web.
7. using Frontpage Explorer go to Tools | Permissions, then go to the "Groups" folder, edit "Everyone" to make the permissions "Author and browse." This is very important. The Data Admin pages will not run until the database is located in a child website with these permissions.
8. Call up the page "admilogi.asp" (See Data Admin Login below)

Data Admin Login

The following describes each input field for the login page.

Name.
This is a security field. The inputted text must match the value of LogiName from GLOBVARS.ASP to successfully use DataAdmin. (original value = "administrator")

Password.
This is a security field. The inputted text must match the value of LogiPass from GLOBVARS.ASP to successfully use DataAdmin. (original value = "dataadmin")

Use DSN-Less Connection.
Check this box if you will be using DSN-Less connections. This affects Database Path/Name below.

Database Path/Name.
1. DSN-Less Connection Checked
Input the relative path and name of the Access database file you wish to edit. This path must be the relative path from the folder the DataAdmin .ASP files exist. I realize this is somewhat of a hassle but it does provide more security to your site. Examples might be "../data/_private/dataadmin" OR "/_private/filename". Note you should not put the ".mdb" extension.
2. DSN-Less Connection Not Checked
Input the DSN name of the database you wish to edit. Examples might be "dataadmin" OR "filename". Note you should not put the ".mdb" extension.

Database User ID.
Input the database User ID name here if there exists one. Typically this is "admin" or something similar. For DATAADMI.MDB it is "admin". If the database neither has a user ID nor a password, leave this field blank.

Database Password.
Input the database password here if there exists one. For DATAADMI.MDB it is "dataadmin". If the database neither has a user ID nor a password leave this field blank.

Table Name.
Input a valid table name for the database here. The table for DATAADMI.MDB is "dataadmin".

Ascending Order by Field.
Optional input. If you are looking for a particular record listing the table entries in ascending order by a particular field may help. Of course, this value must be a valid field name for the table.

Descending Order by Field.
Optional input. If you are looking for a particular record listing the table entries in descending order by a particular field may help. Of course, this value must be a valid field name for the table.

DataAdmin will return an ERROR if any of the above information is invalid. A user must input the correct information in order to use DataAdmin. See Use_Cook variable in GLOBVARS.ASP to help.

Additional Setup Options

1. Edit GLOBVARS.ASP for other options to change names, passwords, redirection page url, home page url, etc...See below

Global variable definitions

LogiName
"Login Name" is the name users must use to log in succesfully to Data Admin.

LogiPass
"Login Password" is the password users must useto log in successfully to Data Admin.

RediPage
"Redirection Page" is the URL that pages will use when a user tries call on of the Data Admin pages without the proper authority. This typically will be your home page URL.

HomePage
"Home Page" is the URL that "Home" will link to thoughout the Data Admin pages.

Use_Cook
"Use Cookies" denotes whether Data Admin should or should not use cookies to save information from the login page. Passwords are not save in cookies.

CookFile
"Cookie file name" is the name, along with the website URL, all cookies are saved for the discussion group. ASP-DataAdmin uses cookies to save login information for users' convenience.

NumbRecoPage
"Number Records Page" is the number of records to display on the data listing page. Must be greater than 1.

History - Enhancements/Bugs

Version 1.1
a.
Bug. Fixed the handling of Null values for fields in editing records.
b. Bug. Previous version assumed the auto increment field was always the first field when updating records. Very bad assumption!
c. Enhancement. Included the global variable NumbRecoPage.

Naming Conventions

1. General. I believe the first four characters of most words are usually descriptive enough to remind the reader what a word is when used in variable names. Therefore, I use this "four-character" rule for file, function, and variable names for three reasons. One, it creates a consistent naming convention. Two, it usually gives enough information to suggest to the reader what the name means. Three, it helps reduce the size of .ASP files.

2. File Names. ASP files are named using four-character rule of the most two descriptive words I can come up with for that file. i.e.
insemess.asp is "Insert Message"
dispthre.asp is "Display Thread"
commfunc.asp is "Common Functions.

3. Function Names. Again I use the four-character rule of the 2-3 most descriptive words for the function with a '_' between each word. i.e.
open_data() is "Open Database"
upda_info() is "Update Info Table"
save_emai_addr() is "Save Email Address".

4. Global or Public Variable Names. Global variables use the four-character rule with the first character of each four letters in upper case. i.e.
SearStri is "Search string"
PageNumb is "Page Number"
AutoNumb is "Auto Number"
Conn is "Connection"

5. Local or Function Variable Names. Local variables can and should be treated differently because they are used in a relatively small section of code. Therefore, if they are appropriately defined (or the definition is obvious), then it is not important to have a long descriptive name. As such, all local and function variables are restricted to one or two characters and are always lower case. The letter may signify the beginning of a descriptive word but do not always. Another benefit of this approach is that there should never be a conflict with global and local variables..

Create a child web

1. Open your root web in FrontPage Explorer.
2. Create a new folder using the name you want for you child web.
3. Click on "File, New FrontPage Web".
4. Select from Wizard or Template: "Empty Web."
5. Give it a title with the same name and case of the sub folder you created from 2 above. i.e. "disc", "images"...
6. Make sure server path is correct. i.e. "www.domain.com." This does not include the folder name.
7. Make sure "Add to Existing Web" is unchecked.
8. Click OK.