Tuesday, September 15, 2009

Reflection of Exercise 1
Exercise 1's steps. Here are our steps :
Step 1 : Setup a site
1. Create new site named registration (URL = http://localhost/registration/.)
2. Select "ASP VBScript" as a server technology.
3. Save file at "c:\inetpub\wwwroot\registration\"
Step 2 : Setup the Database file in Access
1. Click blank database
2. Insert fields : ID, names, username, password and remarks.
3. For password field, change the type into password.
4. Save "data.mdb" as MS Access 003-2003 format in "c:\inetpub\wwwroot\data\"
5. Close the database (important)
Step 3 : Setup the Connection
1. In Dreamweaver, open ASP page and click Window>Database.
2. Click (+) button and select Custom Connection String.
3Named the connection as "dmx" and then insert the connection string and choose "using driver in testing server".
4. Test the connection and it was succesful.Step
4 : Setup the Form
1. Create new page with ASP VBScript.
2. Insert the text and textfield for name, username, password, and remarks from the form menu.
3. Create a "save" button.
4. Each textfield name was matched with the fields in the database.
5. Change the password type into "password".
6. Set Multiline for remarks and 80 char for the rest textfields.
7. Save in "c:\inetpub\wwwroot\registration\" and named it as registration.asp.
Step 5 : Writing a data into databse using the insert record
1. Activated "Server Behaviour" tab and click (+) and select "Insert Record"
2.Choose dmx connection then click OK.
3. We save our file
Step 6 : Reading/Viewing a data from a database using RecordSet
1. Create new ASP VBScript file and save it as view.asp.
2. Create a viewing table consist of all user personal info.
3. Activated ServerBehaviors tab, click (+) and select RecordSet(Query).
4. Choose the dmx connection.
5. Choose "name" and "ascending".
6. Then activated Binding tab. Click (+) and select RecordSet(Query).
7. Drag each recordset into its textfield in view.asp.
8. After that, create a line below the table and hightlighted it including the table.
9. Click (+) and choose "repeat region", then select "recordset1" and click at "all records".
10. Save the file ( this file is for viewing the record only)
Step 7 : Execute the file
1. Open back registration.asp the double click "Insert Record Behavior " in "Server Behavior" Window.
2. Added up "view.asp" in "After inserting, go to : "section.
3. Then saved it
4. Click "Preview" in Browser icon.
5. After the page loaded, we fill up the data in every textfield and click "save" button.
6. Then we can see the information in the table in view.asp.
7. After we insert a new record, the record also can be view together with the previous one.
8. After everything main part was OK, we inserted images to make it more attractive.
9. Save the file.

congratulation

thank you hisham and korn for your efforts in doing exercise 1and congratulation for getting full mark from Dr zaida