navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

update two or more records at once ?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> update two or more records at once ?
Page: [1]
 
adavies

 

Posts: 42
From: Cincinnati, Ohio, USA
Status: offline

 
update two or more records at once ? - 12/28/2001 14:38:51   
Is it possible to update two or more records in an Access database ... using a custom query where the custom query looks something like this
UPDATE PRODUCTS SET
DrawingNumber='::DrawingNumber::',
Qty=::Qty::,
Units=::Units::,
Total=::Qty::*::Units::
WHERE DrawingNumber='::DrawingNumber::'

and each record's Total figure is different per the formula above ?

thanks and I hope this makes sense

Ashley


Mojo

 

Posts: 2441
From: Chicago
Status: offline

 
RE: update two or more records at once ? - 12/28/2001 23:17:19   
You can update many records at once, but I am a little confused as to what you are trying to do.

Why are you updating the column "DrawingNumber" with the parameter "DrawingNumber"? You are using "DrawingNumber" in your WHERE clause. Example: If the parameter "DrawingNumber" equals 5 then you will only update those records where the column "DrawingNumber" also equals 5. You are then trying to set the column to 5, which it already is...

The line "Total=::Qty::*::Units::" is also not needed since you already have both fields, Qty and Units in your database. Anytime you need the total you should either build the total in your SQL statement or grab both Qty and Units and build the total in the application layer. This is a small part of what is called database Normalization, which has it's own rules that are designed to make databases run faster and lighter and follow a "standard".

So your update could now look like:

UPDATE PRODUCTS SET
Qty=::Qty::,
Units=::Units::,
WHERE DrawingNumber='::DrawingNumber::'

Unless, I really don't understand what you are after.

Joe





(in reply to adavies)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> update two or more records at once ?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts