Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 13th, 2003, 04:22 PM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot get multiple delete using checkboxes workin

I have tried in vain after using 2 books - Wrox Prof ASP 3.0 and the compplete
Reference for DWMX and about 8 different tutorial sites on the web that
have examples on how to delete multiple records selected by checkbox. NONE
work. They wll work great until I put in the Command1.execute() line or the
rs_Raters_List_ID2.delete after gathering the data. I can write all the
variables out without those lines in and the values are correct and good
values which it should be able to delete, but to no avail.

This is the link for the page of records -
http://www.engconcepts.net/Verify_Ra...p?SupvID=10153

After selecting some and hitting Submit - it crashes. Below is the script
code before the HTML part of the page. This is just the last of many
unsuccessful approaches. I have taken this dysfunctional code out so you
can see the values that the checkbox selections bring over. I would love
some help here.

Thanks
George

<%
Dim rs_Raters_List
Dim rs_Raters_List_numRows

Set rs_Raters_List = Server.CreateObject("ADODB.Recordset")
rs_Raters_List.ActiveConnection = MM_websurveys_STRING
rs_Raters_List.Source = "SELECT ID, supervisor, rater, rater_email,
Rater_Code, Supv_Code FROM Non_Covered_Data WHERE rater='" +
Replace(rs_Raters_List__supervisor_code, "'", "''") + "' ORDER BY rater"
rs_Raters_List.CursorType = 0
rs_Raters_List.CursorLocation = 2
rs_Raters_List.LockType = 1
rs_Raters_List.Open()

rs_Raters_List_numRows = 0
%>
<%
Dim strDeleteChecked
strDeleteChecked = Request.Form("Raters")
Response.Write strDeleteChecked
%>
<%
Dim rs_Raters_List__ID2
rs_Raters_List__ID2 = "10001"
If (Request.Form("Supv_Code") <> "") Then
  rs_Raters_List__ID2 = Request.Form("Supv_Code")
End If
%>
<%
strIDs = Replace(Request.Form, "&Raters=", ",")
strIDs = Replace(strIDs, "Raters", "")
arrIDs = Split(strIDs, ",")
%>
<%
For intCount = 0 To UBound(arrIDs)
 rs_Raters_List.Filter = "ID = " & arrIDs(intCount)
 rs_Raters_List.Delete
 Next
rs_Raters_List.Close()
Response.Redirect("verify_raters.asp")
%>








Similar Threads
Thread Thread Starter Forum Replies Last Post
delete using checkboxes in gridview aspvbnet ASP.NET 2.0 Basics 1 November 22nd, 2006 08:28 PM
Delete records in MySQL using checkboxes in forms taslim Beginning PHP 2 August 10th, 2006 05:01 AM
The use of checkboxes to delete records inoracle9i luisbueno Classic ASP Databases 0 December 24th, 2004 12:07 PM
Multiple Checkboxes Error mgreenwood BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 May 27th, 2004 02:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.