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 22nd, 2004, 09:44 PM
Authorized User
 
Join Date: Jan 2004
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default update multiple records (solved)

hi
i have a table called LIST with the the following columns, ID, NAME, DEPT. other than ID which is the primary key, the other 2 columns accept null values

now i have a form which displays all the records from LIST in the respective fields, i.e. ID column in txtfieldID, NAME in txtfieldNAME etc. is there anyway i can update all the records shown after submitting the form? updating a single record is fine, but when it comes to multiple records, the values in request("txtfieldID") etc will be in array

how do i go about constructing my statement to update multiple records?

btw. i am using access at home and sql at the office, incase there is a difference in the way to construct the abovementioned statement
 
Old February 23rd, 2004, 09:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You will need to update each record independantly, especially if you are using Access. The trick is to name each form field differently (but according to a pattern), which then allows you to get the relevant data for each record on the next page. There is some sample code here (but the download link doesn't work):
http://www.adopenstatic.com/resource...plerecords.asp

If you are using SQL Server, then you can use a Command object (instead of inline SQL), and assign the values of the various fields to parameter objects, but the basic principle is the same.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com
 
Old February 24th, 2004, 12:23 AM
Authorized User
 
Join Date: Jan 2004
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your help
now i know how to go about updating multiple records






Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Multiple Records cancer10 Classic ASP Databases 0 October 25th, 2006 01:01 AM
update multiple records mateenmohd Classic ASP Basics 4 June 28th, 2004 03:38 AM
How Can I Update Multiple Records Lucy SQL Server ASP 3 March 18th, 2004 03:19 PM
auto-update multiple records in subform stoneman Access 1 February 8th, 2004 12:19 AM
Update or add multiple table records rosenzl VB.NET 3 June 12th, 2003 01:59 PM





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