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 February 9th, 2005, 03:39 AM
Authorized User
 
Join Date: Nov 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tks_muthu
Default How to delete the Multiple Records Using Checkbox

Hi all!

i am using the checkbox for the purpose of delete the checked items.
when i click more than one checkbox

the request.form value is displayed below
GWT-2/8/2005-00003*IC-098,GWT-2/8/2005-00004*IC-876, GWT-2/8/2005-00004*IC-098, GWT-2/8/2005-00005*IC-876

then how can i split the value like

BookId=GWT-2/8/2005-00003
FlightNo=IC-098

for all values


plz help. i will expecting ur reply



Muthu
__________________
Muthu
 
Old February 9th, 2005, 03:50 AM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You don't have to split the things to delete it from the database.
Just use the following code structure
Code:
if trim(request.form("chk")) <> "" then
qry_delete = "DELETE FROM tbl_NAME WHERE ConditionField IN (" & request.form("chk") & ")"
conn.execute delete 
end if




Shibu Narayanan
Software Associates
 
Old February 9th, 2005, 03:55 AM
Authorized User
 
Join Date: Nov 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tks_muthu
Default

Quote:
quote:Originally posted by Shibu
 You don't have to split the things to delete it from the database.
Just use the following code structure
Code:
if trim(request.form("chk")) <> "" then
qry_delete = "DELETE FROM tbl_NAME WHERE ConditionField IN (" & request.form("chk") & ")"
conn.execute delete 
end if




Shibu Narayanan
Software Associates
Hi Shibu!
actually i would like to delete the record using various field
like BookingId and FlightNo from two different tables.

so plz ask how to split these



Muthu
 
Old February 9th, 2005, 10:05 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

strData = Request.form("SomeName")
ArrayName = split(strData, ",")

the second parameter of the split function is for specifing the delimiter.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old February 10th, 2005, 03:19 AM
Authorized User
 
Join Date: Nov 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tks_muthu
Default

Thank You Very Much!

Muthu





Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP Multiple delete Checkbox joepublic JSP Basics 1 February 17th, 2005 02:57 PM
Multiple Delete Records With CheckBox XXL Classic ASP Basics 5 December 29th, 2004 08:46 PM
How Can I Delete Multiple Records From a Table? Lucy SQL Server 2000 5 May 12th, 2004 05:20 AM





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