View Single Post
  #1 (permalink)  
Old Nov 10th, 2004, 02:03
Monie Monie is offline
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Delete All Record in a search result page?

Hai spinal...
I have this page that will displays all the information from a search page.
The user will enter a DATE in the search page and then the result page will display all the DATE that the user requested.

What i want to do in this result page is,
I want to delete all the RECORD/DATA displayed in the result page and then after deleting, the page will redirect to the main page. I dont know how to do that spinal. Could you help me please.

Below is my code for the result page. "bnBookDate" is the search field in the search page.
I tried to use your delete by checkbox in this code but I cannot manage to modify them because after deleting,
we cannot display back the data(which your code does that..) We must redirect the page to another page.

Please spinal...HELP ME!

Result page: This is an action page comes from the search page.
Code: Select all
<%@LANGUAGE="VBSCRIPT"%>

<%
Dim rs__MMColParam
rs__MMColParam = "1"
if (Request.QueryString("bnBookDate") <> "") then rs__MMColParam = Request.QueryString("bnBookDate")
%>
<%
set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_bn_STRING
rs.Source = "SELECT *  FROM BN  WHERE bnBookDate = '" + Replace(rs__MMColParam, "'", "''") + "'"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 3
rs.Open()
rs_numRows = 0
%>
The only thing that I wanted to do in the result page is to delete all the data that are displayed only?
Please help me.........