Presentation is loading. Please wait.

Presentation is loading. Please wait.

June 23, 2001Database Creation Review and Exercises1 Building an Application - Part I -

Similar presentations


Presentation on theme: "June 23, 2001Database Creation Review and Exercises1 Building an Application - Part I -"— Presentation transcript:

1 June 23, 2001Database Creation Review and Exercises1 Building an Application - Part I -

2 June 23, 2001Database Creation Review and Exercises2 What You Were Asked to Do Build 5 generic web page components –1 person creates a css file for the project –1 person creates the Access database and populates it for test purposes (using the Acess GUI) –1 person creates the the default.asp file using procedures to create standard header and footer –1 person writes a function to open the database and a procedure for creating a recordset for reporting –1 person writes a procedure for generating a report using all records and fields from the recordset These components will be used in this application: default.aspprojectx.db Project's Home Page report.asp Project's Database Report

3 June 23, 2001Database Creation Review and Exercises3 Things You Need to Know Use Personal Web Server (PWS) –Directory structure –URL –PWS options –Creating a connection object Editing ASP files Finding adovbs.inc (C:\Program Files\Common Files\System\ADO) Naming css files (Must end in "htm" or "html")

4 June 23, 2001Database Creation Review and Exercises4 Personal Web Server (PWS) "C" Drive Inetpub wwwroot YourProject Default directory for PWS Download Install using "setup.exe" Top folder for installed PWS files Root for your personal web site URL is http://localhost Place your application files here You can create subbordinate directories URL for files in here: "/yourproject/yourfilename" PWSSetupFiles

5 June 23, 2001Database Creation Review and Exercises5 Tailoring Your PWS Right click on PWS icon (at bottom of screen) Click on "Properties" PWS "Main" window appears

6 June 23, 2001Database Creation Review and Exercises6 PWS Main Window Select "Advanced" from the "View" pulldown meny

7 June 23, 2001Database Creation Review and Exercises7 Advanced Options Select default document Set default document to "default.asp" Allow directory browsing

8 June 23, 2001Database Creation Review and Exercises8 Creating A Connection Object Think of the connection object as your database You need to: –Create a connection object –Set connections's properties –Call open method with connection string Different with each database and each server Many times dependent on version of database For Access on PWS (I hope): dim oConnection 'Connection object 'Create connection object, define provider, open database Set oConnection = server.createobject("ADODB.Connection") oConnection.Provider="Microsoft.Jet.OLEDB.4.0" oConnection.Open "c:\inetpub\wwwroot\db\goodbike.mdb"

9 June 23, 2001Database Creation Review and Exercises9 Editting an ASP File Typically cannot edit via a double click One method: 1) Select the file 2) Right click and select "Send To" 3) Select Notepad or Wordpad Another method: 1) Select the file 2) Shift right click and select "Open With" or "Send To" 3) Select Notepad or Wordpad or better yet... Use the DOS "Edit" command !!!

10 June 23, 2001Database Creation Review and Exercises10 DOS Edit Command Why DOS Edit? Allows you to easily find line number (and column number) In a nutshell: 1) Start  Program --> MS-DOS Prompt 2) Go to your project directory via "cd" command 3) Enter the "Edit" Command 4) Open your ASP file 5) Edit your ASP file 6) Save your ASP file DOS Edit just another window Keep window open at all times

11 June 23, 2001Database Creation Review and Exercises11 Invoking a DOS Window

12 June 23, 2001Database Creation Review and Exercises12 asdf

13 June 23, 2001Database Creation Review and Exercises13 Invoking DOS Edit Go to your project directory Enter the "edit" command

14 June 23, 2001Database Creation Review and Exercises14 Open Your ASP File This window popped up as a result of selecting "open" under the File Pulldown Menu This causes all "asp" programs to be listed. You can change this to anything you want.

15 June 23, 2001Database Creation Review and Exercises15 Editing Your File Line number and column number of cursor

16 June 23, 2001Database Creation Review and Exercises16 Saving Your Edits Select the "Save' Option

17 June 23, 2001Database Creation Review and Exercises17 Your Specific Problem Problem Statement: "Goodbike needs a Supplier Management system so that they can track and report on their suppliers" You need to: Modify your generic products to meet this specific requirement -The CSS file -The database design -The web page's headers and footers -The funciton for opening the database and procedure for creating a recordset -The procedure for generating a report

18 June 23, 2001Database Creation Review and Exercises18 The Style Requirements Requirement 1: Insure that all paragraphs used throughout the pages have the following characteristics. Note: include a paragraph to prove that it works. (CSS): background color = yellow left margin = 20% right margin:20% top border width = 10pt bottom border width = 10pt right border width = 5pt left border width = 5pt border style = outset border color = blue; top padding = 10pt bottom padding = 10pt font family = verdana, arial; right padding = 20pt left padding = 20pt

19 June 23, 2001Database Creation Review and Exercises19 The Database Schema Requirement Requirement 2: They must store the following information about their suppliers (Database Table): Supplier Number – Auto Generated Number Name – 50 Characters Address – 50 Characters City – 50 Characters State – 2 Characters Zip – 9 Characters Phone – 10 Characters

20 June 23, 2001Database Creation Review and Exercises20 Web Page Appearance Requirement Requirement 3: Create and use procedures that insure that the information at the top and bottom of each page is the same. At a minimum, put the company name at the top each page and a link back to the home page at the bottom of each page.

21 June 23, 2001Database Creation Review and Exercises21 DB Open and Query Requirement Requirement 4: Create a function that opens the database and a procedure for creating a recordset. The record set returned shall contain all records in the supplier table.

22 June 23, 2001Database Creation Review and Exercises22 Reporting Requirement Requirement 5: Allow the user to display a report which lists the following information about suppliers. Supplier Number Supplier Name Supplier City Supplier State


Download ppt "June 23, 2001Database Creation Review and Exercises1 Building an Application - Part I -"

Similar presentations


Ads by Google