473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

updating multiple records via online form

Hello,
I have a database generated form that I would like users to be able to
update by selecting a checkbox. Say the page displayed has six records
on it and the user wants to delete one or more of the records. They
would click the checkbox and hit a "delete" button. Then the database
would be updated and the user redirected back to the page that would
now show all the records that weren't deleted. Sort of like Yahoo
mail, you get a list of all the bulk mail, select the ones that you
want to delete, hit a delete button, and the page is updated to show
what e-mail is left. How do I do this using ASP?
Jul 19 '05 #1
2 3224
1) Display the page with checkboxes
<input type=checkbox name="RecordsToDelete"
value="<%=RS.Fields("RecordPrimaryKey")">
2) When the form is posted back, take the comma separated string of records
to delete
Request.Form("RecordsToDelete")
and split them into an array
3) take the array and issue a delete command to the database
"DELETE FROM TableX WHERE RecordPrimaryKey=" & arr(i)
"dukeofwhelmsley" <du*************@yahoo.com> wrote in message
news:9d*************************@posting.google.co m...
Hello,
I have a database generated form that I would like users to be able to
update by selecting a checkbox. Say the page displayed has six records
on it and the user wants to delete one or more of the records. They
would click the checkbox and hit a "delete" button. Then the database
would be updated and the user redirected back to the page that would
now show all the records that weren't deleted. Sort of like Yahoo
mail, you get a list of all the bulk mail, select the ones that you
want to delete, hit a delete button, and the page is updated to show
what e-mail is left. How do I do this using ASP?

Jul 19 '05 #2
"DELETE FROM TableX WHERE RecordPrimaryKey IN (" &
Request.Form("RecordsToDelete") & ")"

"dlbjr" <dl***@dontknow.doyou> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Why not just do this

DELETE FROM TableX WHERE RecordPrimaryKey IN (RS.Fields("RecordPrimaryKey"))

dlbjr

Unambit from meager knowledge of inane others,
engender uncharted sagacity.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Sans Spam | last post by:
Greetings! I have a table that contains all of the function permissions within a given application. These functions are different sections of a site and each has its own permissions (READ, WRITE,...
6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
3
by: Ryan.Chowdhury | last post by:
This is a general question regarding the use of view and stored procedures. I'm fairly new to databases and SQL. I've created a SQL database using an Access Data Project ("ADP") and I'm...
3
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need...
4
by: Darrel | last post by:
I'm creating a table that contains multiple records pulled out of the database. I'm building the table myself and passing it to the page since the table needs to be fairly customized (ie, a...
12
by: shank | last post by:
I'm trying to use online samples for submitting multiple records from ASP into a stored procedure. Failing! Through the below form, a user could be submitting many records at a time. I'm not...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
10
by: chimambo | last post by:
Hi All, I have a little problem. I am retrieving records from a table and I want to update the records using checkboxes. I am able to display the database record quite alright and I have created...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.