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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Primary Autonumber Key Causing trouble with referential integrity 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a primary key that is an autonumber known as [Client ID] and I have another table with [Client ID] that I use for relationship purposes. The [Client ID] in the child table is not defined as a primary key because I want to have a one-to-many relationship. the problem I am having comes when I try to create the relationship and enforce referential integrity.


When I select "Enforce Referential Integrity" and Cascade Deketed Related Records and hit create everything works fine. But once I select Cascade Update Related records I get the error message that says ***Invalid Field Definition 'Client ID' in definition of index or relationship.

The weird thing is that when I change the type from autonumber to text and reset the relationships it allows me to select both Referential Integrities, "Update..." & "Cascade..." Why is autonumber causing this problem? Thanks
 
If a primary key is autonumber, the foreign key data type must be Number, Long Integer. If you've made them both autonumber, you'll get this error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top