Deleted record still displayed

Results 1 to 2 of 2

Thread: Deleted record still displayed

  1. #1
    Join Date
    Dec 1969

    Default Deleted record still displayed

    I&#039;m trying to make an ASP page that outputs a list of &#039;messages&#039; directed to a particular user from an Access database, and allows the user to read them or delete them. The listing and reading work correctly, but I&#039;m having some problems with the deleting.<BR><BR>Ideally, if the user clicks delete, I would like the same page to reload and delete the message from the database before displaying the remaining messages. When I tried to set it up that way, the code would execute, but the "deleted" message would still be displayed in the list. The record WAS deleted... I can see from my database, and if I left the page and returned, it was gone. I&#039;m using the RS.Delete method, if it makes a difference. I have not tried with a SQL statement.<BR><BR>I worked around it by having the user forwarded to a page where the record is deleted, then automatically forwarded back, but this seems awkward to me.<BR><BR>Has anyone else run into this?<BR>Is it not a good idea to go about it the way I am?<BR><BR>Thanks.<BR><BR>-brendan

  2. #2
    Join Date
    Dec 1969

    Default RE: Deleted record still displayed

    &#060;%<BR>CheckPageAction()<BR><BR>RenderPage()<B R><BR>Sub DeleteRecord(ByVal idToDelete)<BR>-- delete record --<BR>End Sub<BR><BR>Sub CheckPageAction()<BR> If Request.QueryString("act") = "del" Then<BR> Call DeleteRecord(Request.QueryString("id"))<BR> End If<BR>End Sub<BR><BR>Sub RenderPage()<BR>-- code to display list and read items --<BR>End Sub<BR>%&#062;<BR><BR>That&#039;s basically how I have my ASP pages setup. I do all of the activities on a single page. Database changes, as long as they are made BEFORE you read from the database will be reflected when you do the db read.

Posting Permissions

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