changing primary key

ssh

Registered User.
Local time
Today, 06:49
Joined
May 22, 2002
Messages
49
How to change primary key in main table and in subtable at once?
 
Cannot be done

Need to delete Link

Change each table in turn

Remake link


Len
 
Me 2 think cannot be done... do like above...
 
Cascade Update

As long as your primary key is not an autonumber, it can be done. You need to establish a relationship and select the enforce Referential Integrity option. That will open up the cascade delete and cascade update options which you also need to select. Once cascade update is applied, any changes you make to the value of a primary key in the parent table will be "cascaded" to the related foreign key in the child table.

If Jet won't allow you to enforce RI, you will need to clean up your data. Once the orphans are eliminated (it's a cruel world), you can go back and enforce RI.
 
Based on Pat's post it does seem that I mis interpreted your question. My comments were based on actually changing tye primary key not changing the value of a primary key. Sorry if I confused you

Len
 
Pat's information helped me, thanks!
 

Users who are viewing this thread

Back
Top Bottom