Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InnerJoin Update Query 3

Status
Not open for further replies.

rtshort

IS-IT--Management
Joined
Feb 28, 2001
Messages
878
Location
US
I have 2 tables. One table has a PrimaryKey that is linked to the other table as a Foreign key, in a relationship. I want to update the information in each table seperatly.

I tried to update one but it won't let me because of the relationship.

How would I do this?

Rob
Just my $.02.
 

Can you explain more precisely what you want to do and what messages you get when you try to do it? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thanks, I'll try.

I have a table for owner information (OwnerDB) and a table for vehicle information (VehicleDB). The primary key(ClaimNo) is in the OwnerDB and the Foreign key is in the VehicleDB. The primary key is ClaimNo, and is related to the Foreign key in the VehicleDB table. I set up the relationship so the Owner information and the Vehicle information would be tied together by the ClaimNo.

I want to give the user the option to update the Owner Information but not the Vehicle Information, since altering the vehicle information would affect the price of the parts.

I can't update just the OwnerDB because the Primary Key is not letting me. It wants both to be updated because of the relationship, I guess.

Hope this makes more sense.

Rob
Just my $.02.
 

I agree. There should be no problem unless updating the key field. What is the message? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
I put a VB Message Box to see how the statement looked before it executed and the statement looked correct but at the first of it it had False,Update ClaimDB set.....

Everything looked right, but I can't figure out where the false is comming from. I thought in VB I might have set a Boolean Variable, but I checked and I don't see anything that may be making it say false. I'll have to get the SQL error tomorrow. Thanks guys. Rob
Just my $.02.
 
Rob,
Sounds like you have a expression that equates to False and is messing up the SQL statement.

Gluck Mike Davis
MSsql, VB and Crystal Reports Developer
 
Thanks for all of the help guys. I got it figured out and am ashamed to say I had the syntax wrong in VB. I just looked at it until I was blue in the face and got frustrated. All of your post did help though. Thanks for taking the time to help me.

I give ya all a star
Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top