<% action = request("action") if len(action) > 0 then if action = "Add" then rp_cus_name = request("rp_cus_name") rp_country_id= request("rp_country_id") qryAdd = "insert into report_customer(rp_cus_name, rp_country_id) values('"& encode(rp_cus_name) &"', "& rp_country_id &")" set rsAdd =conn.execute(qryAdd) set rsAdd = nothing elseif action = "Delete" then rp_cus_id = request("rp_cus_id") qryDel = "delete from report_customer where rp_cus_id = "& rp_cus_id &"" set rsDel = conn.execute(qryDel) set rsDel = nothing end if response.redirect "report_customer.asp" end if %>
<% 'From menu = == Program sql = "select * from report_customer order by rp_country_id, rp_cus_id" set rs = conn.execute(sql) response.write "Found : " & rs.recordcount & " item(s)" do while not rs.eof %> <% rs.movenext:loop set rs = nothing %>
Report : Customer
 Customer
 Country
Edit
Del
 <%=rs("rp_cus_name")%>   <% qryCT = "select rp_country_name from report_country where rp_country_id = "& rs("rp_country_id") &"" set rsCT = conn.execute(qryCT) if not rsCT.eof then response.write rsCT("rp_country_name") end if set rsCT = nothing %>
 
   
   
Customer:
Country :