SQL Status: S0011 Error code: -170

Hi,

Wonder if anyone can help. I have created several tables all with primary keys, all integers, all with unique field names, all auto incremented. When it comes to establishing relationships I have tried to link between the the various tables (using the two methods), but could not get any of them to work. Instead I get this error message. Am I doing something simple wrong? Below is the error message generated.

SQL Status: S0011
Error code: -170

Primary or unique constraint required on main table: “STATION” in statement [ALTER TABLE “LIST_ALLIEGENCE” ADD FOREIGN KEY (“Alliegence”) REFERENCES “STATION” (“StatAlleg”)]

OK, I have managed to solve this myself. Adding the ID fields as integers and using these as the primary key is unnecessary. The tutorial i was using suggested this. As long as the primary field is unique i.e. the names it seems to work. List fields do not need to be link in the relationship tables.