a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

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

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 query problem

 
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 query problem
Page: [1]
 
ilovefood

 

Posts: 7
From: None
Status: offline

 
update query problem - 8/15/2001 20:43:00   
I have written an update query using the DRW--it is updating a query in Access; it works great until I change a record for one field which is based on a lookup table. Example: 50 records where one field is a choice of cups, glasses, and tumblers. Now, when the user updates/changes cups to glasses, ALL the records (say 28) that are cups are now glasses. I have a primary key for each record. I have thought of enforcing referential integrity between the two tables that create the query, but can't because it says it's violated ref integ rules.

Anyone been down this road before?

rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: update query problem - 8/15/2001 20:07:00   
Are you changing the lookup table or the field? It sounds like you may actually be updating the lookup table but I'm not sure....

Also, be sure you're using your primary key as the WHERE parameter.

EDIT: I can't spell worth do-do...

[This message has been edited by rdouglass (edited 08-15-2001).]


(in reply to ilovefood)
ilovefood

 

Posts: 7
From: None
Status: offline

 
RE: update query problem - 8/15/2001 20:14:00   
Correct. As the query stands it is updating the lookup table as well. I definitely do not want this to happen--just change the data for the record in the primary table. My primary key is the WHERE parameter. I am trying to prevent just putting all the fields in one table and avoiding the lookup altogether--but surely this can be done without that....right?

quote:
Originally posted by rdouglass:
Are you changing the lookup table or the field? It sounds like you may actually be updating the lookup table but I'm not sure....

Also, be sure you're using your primary key as the WHERE parameter.

EDIT: I can't spell worth do-do...

[This message has been edited by rdouglass (edited 08-15-2001).]



(in reply to ilovefood)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: update query problem - 8/15/2001 20:28:00   
Are you updating via a query (in Access) or updating directly into the table (not the lookup table)???

(in reply to ilovefood)
ilovefood

 

Posts: 7
From: None
Status: offline

 
RE: update query problem - 8/15/2001 20:46:00   
Good question. I am using a custom update query in the DRW which updates a query in Access which has one field in particular that is based on a lookup table (my example of cups, glasses, tumblers). The other fields update fine, this one culprit field contains the lookup data which, when changed from cups, to say, glasses, changes all the records which were cups to glasses in the primary table and the lookup table.

What a sentence! I hope it makes sense!



(in reply to ilovefood)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: update query problem - 8/15/2001 23:17:00   
Try updating the table instead of the Access query....

(in reply to ilovefood)
ilovefood

 

Posts: 7
From: None
Status: offline

 
RE: update query problem - 8/15/2001 23:27:00   
I solved this for now by choosing to put all the fields in one table--dissing the lookup. All updates work fine. Thanks rdouglass for your responses and help, I really appreciate it.

If anyone out there sees this and has another solution for updating a query that has a lookup attached to it, let me know.


(in reply to ilovefood)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> update query problem
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