Web Design and Development Forums

delete by checkbox

This is a discussion on "delete by checkbox" within the ASP Forum section. This forum, and the thread "delete by checkbox are both part of the Program Your Website category.

Old Mar 28th, 2008, 11:04   #1 (permalink)
New Member
 
Join Date: Mar 2008
Location: Spain
Age: 22
Posts: 1
delete by checkbox

Hello, I would like delete records from my database with a checkbox. Show registration which is in my database and next would like a checkbox, and eliminate selected registration.
I am using this code I found in this forum but can not make it work, you can help me?
Code: Select all
<%
session("servidor")="********"
 
session("usuariobd")="*****"
 
session("contrasenabd")="******"
 
session("bd")="*******"
dim conexion
set conexion = Server.CreateObject("ADODB.Connection")
 
 
Dim pm, conn, rsCount
 
Set conn = Server.CreateObject("ADODB.Connection")
Set pm = Server.CreateObject("ADODB.Recordset") 
conn.Open = "driver={MySQL};server="&session("servidor")&";uid="&session("usuariobd")&";pwd="&session("contrasenabd")&";database="&session("bd")&""
Dim comment
 
For Each comment In Request("delete")
pm.Open "DELETE FROM usuario WHERE id = "& comment &"", conn,3,3
'Set pm = conn.Execute ("DELETE FROM userpm WHERE pmNo = "& comment &"") Can be done like this too, I don't have idea what is the different??
Next 
pm.Open "SELECT Nombre,Apellidos,Teléfono, Foto FROM usuario WHERE Nombre = '" & Session ("usuariobd") & "' ORDER BY id DESC", conn
'Set pm = conn.Execute ("DELETE FROM userpm WHERE pmNo = "& comment &"") Can be done like this too, I don't have idea what is the different??
 
 
%>
 
<input type="checkbox" name="delete" title="Select" value="<%=pm("id")%>">
FlashO is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 28th, 2008, 11:53   #2 (permalink)
New Member
 
Join Date: Mar 2008
Location: UK
Age: 15
Posts: 4
Re: delete by checkbox

Are you experienced or could it be coded with php? If so i could help you here...
benracer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 30th, 2008, 07:56   #3 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: delete by checkbox

Can I have your full code please (your display page and all your database field name)
I will try to run them in my pc to test them!

Cheers...
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 30th, 2008, 08:42   #4 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: delete by checkbox

Quote:
Originally Posted by benracer View Post
Are you experienced or could it be coded with php? If so i could help you here...
He is in the ASP forum, so I guess he really need help in ASP not PHP
You know, if he have an account with window hosting, PHP will not work!

So, what error message did you get there FlashO?
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ASP-MySQL Delete By Checkbox Monie ASP Forum 1 Nov 10th, 2007 01:51



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:56.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59