Sub Page_Load(s as object, e as eventargs) If not page.ispostback If Session("logged") <> "Y" Response.Redirect ("login1.aspx") End If dim objConn as new OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/inetpub/wwwroot/fpstudents/team2/IUser/girlscouts.mdb;") dim cmdEvent As OleDbCommand dim intEventID As Int16 = Request.QueryString("ID") 'Event ID is passed in the querystring from the search1.aspx page dim strgetEvent As String = "Select Evt_ID, Evt_title, Evt_date, Evt_time, Evt_loc, Evt_street, Evt_city, Evt_state, Evt_zip, Evt_troop, evt_phnum, evt_descript, evt_Comments from EventTable where Evt_ID =@Eventid" dim objReader As OleDBDataReader objConn.open cmdEvent= New OleDbCommand(strgetEvent, objConn) cmdEvent.Parameters.Add("@Eventid", intEventID) objReader = cmdEvent.ExecuteReader While objReader.Read() lblEventID.Text = objReader("Evt_ID") ResultsTroop.Text = objReader("evt_troop") ResultsTitle.Text = objReader("evt_title") ResultsDate.Text = objReader("evt_Date") ResultsTime.Text = objReader("evt_Time") ResultsLoc.Text = objReader("evt_Loc") ResultsAddress.Text = objReader("evt_street") ResultsCity.Text = objReader("evt_City") ResultsState.Text = objReader("evt_State") ResultsZip.Text = objReader("evt_zip") ResultsPhone.Text = objReader("evt_Phnum") ResultsDescription.Text = objReader("evt_Descript") ResultsComments.Text = objReader("evt_Comments") End while objReader.Close() objConn.Close() objConn = Nothing End if End Sub Sub btnSubmit_Click(s as object, e as eventargs) If Page.IsValid then Dim strConnect As string dim objConn1 as new OleDBConnection strConnect ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/inetpub/wwwroot/fpstudents/team2/IUser/girlscouts.mdb;" objConn1 = New OleDBConnection(strConnect) objConn1.open dim cmd As New OleDBCommand cmd.Connection = objConn1 cmd.commandText = "Update EventTable " & _ "set Evt_title ='" & ResultsTitle.text & "', " & _ "Evt_date ='" & ResultsDate.text & "', " & _ "Evt_time ='" & ResultsTime.text & "', " & _ "Evt_loc ='" & ResultsLoc.text & "', " & _ "Evt_street ='" & ResultsAddress.text & "', " & _ "Evt_city ='" & ResultsCity.text & "', " & _ "Evt_state ='" & ResultsState.text & "', " & _ "evt_zip ='" & ResultsZip.text & "' , " & _ "evt_troop ='" & ResultsTroop.text & "', " & _ "evt_phnum ='" & Resultsphone.text & "', " & _ "evt_descript ='" & ResultsDescription.text & "', " & _ "evt_Comments ='" & ResultsComments.text & "' " & _ "where evt_ID = " & lblEventId.text cmd.ExecuteNonQuery() objConn1.close() Response.redirect("menu1.aspx") end if End Sub