% ' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit. On Error Resume Next Session("FP_OldCodePage") = Session.CodePage Session("FP_OldLCID") = Session.LCID Session.CodePage = 1252 Err.Clear strErrorUrl = "" If Request.ServerVariables("REQUEST_METHOD") = "POST" Then If Request.Form("VTI-GROUP") = "0" Then Err.Clear Set fp_conn = Server.CreateObject("ADODB.Connection") FP_DumpError strErrorUrl, "Cannot create connection" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "Cannot create record set" fp_conn.Open Application("Quiz_Center_of_Mass_ConnectionString") FP_DumpError strErrorUrl, "Cannot open database" fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "Cannot open record set" fp_rs.AddNew FP_DumpError strErrorUrl, "Cannot add new record set to the database" Dim arFormFields0(16) Dim arFormDBFields0(16) Dim arFormValues0(16) arFormFields0(0) = "shape_of_projectile_path" arFormDBFields0(0) = "shape_of_projectile_path" arFormValues0(0) = Request("shape_of_projectile_path") arFormFields0(1) = "Truck_C_Topple" arFormDBFields0(1) = "Truck_C_Topple" arFormValues0(1) = Request("Truck_C_Topple") arFormFields0(2) = "ycm_1" arFormDBFields0(2) = "ycm_1" arFormValues0(2) = Request("ycm_1") arFormFields0(3) = "xcm_2" arFormDBFields0(3) = "xcm_2" arFormValues0(3) = Request("xcm_2") arFormFields0(4) = "CG_location" arFormDBFields0(4) = "CG_location" arFormValues0(4) = Request("CG_location") arFormFields0(5) = "ycm_2" arFormDBFields0(5) = "ycm_2" arFormValues0(5) = Request("ycm_2") arFormFields0(6) = "Truck_A_Topple" arFormDBFields0(6) = "Truck_A_Topple" arFormValues0(6) = Request("Truck_A_Topple") arFormFields0(7) = "explanation_of_toppling" arFormDBFields0(7) = "explanation_of_toppling" arFormValues0(7) = Request("explanation_of_toppling") arFormFields0(8) = "Name" arFormDBFields0(8) = "Name" arFormValues0(8) = Request("Name") arFormFields0(9) = "shape_of_horizontal_path" arFormDBFields0(9) = "shape_of_horizontal_path" arFormValues0(9) = Request("shape_of_horizontal_path") arFormFields0(10) = "Truck_B_Topple" arFormDBFields0(10) = "Truck_B_Topple" arFormValues0(10) = Request("Truck_B_Topple") arFormFields0(11) = "CM_physical_location" arFormDBFields0(11) = "CM_physical_location" arFormValues0(11) = Request("CM_physical_location") arFormFields0(12) = "Did_own_work" arFormDBFields0(12) = "Did_own_work" arFormValues0(12) = Request("Did_own_work") arFormFields0(13) = "CG_CM" arFormDBFields0(13) = "CG_CM" arFormValues0(13) = Request("CG_CM") arFormFields0(14) = "string_weight" arFormDBFields0(14) = "string_weight" arFormValues0(14) = Request("string_weight") arFormFields0(15) = "xcm_1" arFormDBFields0(15) = "xcm_1" arFormValues0(15) = Request("xcm_1") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 If Request.ServerVariables("REMOTE_HOST") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "Remote_computer_name" End If If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "Browser_type" End If FP_SaveFieldToDB fp_rs, Now, "Timestamp" If Request.ServerVariables("REMOTE_USER") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name" End If fp_rs.Update FP_DumpError strErrorUrl, "Cannot update the database" fp_rs.Close fp_conn.Close FP_FormConfirmation "text/html; charset=windows-1252",_ "Form Confirmation",_ "Thank you for submitting the following information:",_ "Quiz_Center_of_Mass.asp",_ "Return to the form." End If End If Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") %>
Answers must be submitted by 8:00 am Friday, Dec 14, 2007.
Work on the quiz INDIVIDUALLY; no help allowed.
Read CP (the blue book by Hewitt) Chapter 10. Then answer the following questions: