Deleting a single Recordset

Results 1 to 2 of 2

Thread: Deleting a single Recordset

  1. #1
    Join Date
    Dec 1969

    Default Deleting a single Recordset

    I have a search facility that displays the search results in a table. In the last column of this table I wish to inlcude a hyperlink which will point to &#039delete.asp&#039 and only remove that single recordset. <BR>e.g <BR><BR>&#060;Surname&#062;&#060;forename&#062;&#0 60;company&#062;&#060;DELETE?&#062;<BR><BR>Can anyone Help Me ?<BR>Is there an easier way to do this

  2. #2
    Imar Spaanjaars Guest

    Default RE: Deleting a single Recordset

    What you can do is the following:<BR><BR>I asume every record in your recordset has a unique id. Let&#039s call this item_id. We also have a recordset called rsItems.<BR>Now do the following:<BR>if not rsItems.eof &#039 Recordset is not empty<BR> do while not rsItems.eof<BR> Response.write(rsItems("first_name") & " " & rsItems("sur_name" & "&#060;a href=""delete.asp?ID=" & rsItems("item_id") & """&#062;delete&#060;/a&#062;")<BR> rsItems.moveNext()<BR> loop<BR>end if<BR><BR>This will show the first and surname and the word "delete" linked to the delete page with a parameter called ID.<BR><BR>In delete.asp you read this ID (by using Request("ID") ) and delete the chosen item.<BR><BR>That&#039s it<BR>

Posting Permissions

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