Update Using Radio Button in ASP
am 02.12.2004 19:55:47 von lp_us2004Hi
I am trying to retrieve information from the Access database using
RADIO button. I am using UPDATE command in ASP. I am able to update
the information using RADIO buttons. HOWEVER, I am not able to
retrieve the previous value of Radio button (ie Yes/No) already
available in the database before UPDATING (Yes/No) inofrmation. Any
help will be greatly appreciated. I am using the following ASP codes.
TR>
The detailed codes are below:
<%@ Language=VBScript %>
<%
if isempty(Session("EmpID")) then
Response.Redirect "index.asp"
end if
%>
<%
if NOT isempty(Request.Form("update_st")) then
conn.Execute "update St_Per_Eval set " _
& "Name = '" & Session("EmpID") & "', " _
& "St_LastName = '" & Request.Form("St_LastName") & "', " _
& "Intern_Org = '" & Request.Form("Intern_Org") & "', " _
& "Supervisor_Name = '" & Request.Form("Supervisor_Name") & "', " _
& "commitment = '" & Request.Form("commitment") & "', " _
& "HoursPerWeek = '" & Request.Form("HoursPerWeek") & "', " _
& "additional_interns = '" & Request.Form("additional_interns") & "'
where " _
& "StudentID1 = " & Request.Form("StudentID1")& " and Status = 'In
Progress' "
response.redirect "manage.asp"
elseif Request.QueryString("view") = "St_LastName" then
set rsEmps = conn.Execute("select * from St_Per_Eval where
St_LastName = '" _
& Request.QueryString("St_LastName") & "'" & "order by St_LastName")
else
set rsEmps = conn.Execute("Select * from St_Per_Eval where StudentID1
= " _
& Request.QueryString("StudentID1"))
Session("StudentID1") = rsEmps("StudentID1")
end if
%>