Hotmail style page

Results 1 to 2 of 2

Thread: Hotmail style page

  1. #1
    jenny Guest

    Default Hotmail style page

    I am trying to display all the records from database and when all records display on screen i have checkbox next to each recordes when i checked one check box it get deletes from database but recordes still show on the screen<BR>Please help<BR>This is my code for display all the records on the screen<BR>**************************************** *******************%<BR> dim StrSql<BR> dim rs<BR> set rs = server.CreateObject ("ADODB.Recordset")<BR> &#039--This query will display Location,Division,LocationId and DivisionId for selected user--<BR> StrSql = "SELECT hr_rep_assignment.user_id, division.division," _<BR> & "location.location,hr_rep_assignment.division_ id, " _ <BR> & "hr_rep_assignment.location_id " _<BR> & "FROM hr_rep_assignment INNER JOIN " _ <BR> & "division ON hr_rep_assignment.division_id = division.division_id INNER JOIN " _<BR> & "location ON hr_rep_assignment.location_id = location.location_id " _<BR> & "WHERE hr_rep_assignment.user_id = &#039" & StrUsername & "&#039 "<BR> rs.open StrSql,conn<BR> <BR> %&#062;<BR> &#060;input type="hidden" name="hidLocID" value="&#060;%=rs("location_id")%&#062;"&#062;&#06 0;/CENTER&#062;&#060;/TD&#062;<BR> &#060;input type="hidden" name="hidDivID" value="&#060;%=rs("division_id")%&#062;"&#062;&#06 0;/CENTER&#062;&#060;/TD&#062; <BR> <BR> &#060;% do while not rs.eof%&#062;<BR> &#060;TR&#062;<BR> &#060;TD ALIGN= "left"&#062;&#060;INPUT TYPE = "checkbox" NAME = "location" VALUE = "checked"&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;CENTER&#062;&#060;%=rs("locati on_id")%&#062;&#060;/CENTER&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;CENTER&#062;&#060;%=rs("Locati on")%&#062;<BR> &#060;TD&#062;&#060;CENTER&#062;&#060;%=rs("Divisi on_id")%&#062;&#060;/CENTER&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;CENTER&#062;&#060;%=rs("Divisi on")%&#062;&#060;/CENTER&#062;&#060;/TD&#062;<BR> &#060;/TR&#062; <BR> &#060;%rs.movenext%&#062;<BR> &#060;%loop%&#062;<BR><BR>This is code where i do delete when<BR>****************************************** *********<BR><BR> dim delsql <BR> dim delrs<BR> set delrs = server.CreateObject ("ADODB.Recordset")<BR> locid = Request.Form ("hidLocID")<BR> divid = Request.Form ("hidDivID")<BR> if request("deleteloc")&#060;&#062;"" then<BR> for each item in Request.Form <BR> if Request.Form("location") = "checked" then<BR> delsql = "delete from hr_rep_assignment " _<BR> & "where user_id = &#039" & userid & "&#039"_<BR> & "and Location_id = &#039" & request("hidlocid") & "&#039"_<BR> & "and division_id = &#039" & request("hiddivid") & "&#039" <BR> <BR> set delrs.Activeconnection = conn<BR> delrs.Open delsql<BR> end if <BR> next<BR> Response.Write delsql<BR> end if<BR> %&#062; <BR> &#060;/FORM&#062;

  2. #2
    Sathiya Guest

    Default RE: Hotmail style page

    you said that when u delete the records the records are deleted from the dtabase but it still shows the records on the screen. The problem can be because of caching , the page may hold the previous details.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •