Re: Referential Integrity on relationship with Multiple fields
From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 03/18/04
- Next message: Scott: "Sorting w/Primary Key"
- Previous message: Gary: "Firstname Lastname - Lastname, Firstname"
- In reply to: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Next in thread: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Reply: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 00:49:37 +0800
Yes: created in A2003.
Just tested a pair of 30-char fields.
Don't know if it makes a difference, but I am using Jet 4 SP8, i.e.
msjet40.dll is version 4.0.8015.
You are creating the relation on the combination of the 2 fields? i.e. in
the Edit relations dialog, you have:
Table/Query Related Table/Query
Table1 Table2
F1 F1
F2 F2
where Table1 is the one that has F1 + F2 as primary key.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Peter Johal" <anonymous@discussions.microsoft.com> wrote in message news:7C5FD2B1-FAA8-421C-A9C9-C521E01DFDBB@microsoft.com... > > I have two text fields length 30 in both tables. Data type and size match. And there are no hidden indexes, I used your count statement: I a count of 1. > > I created two dummy tables from scratch and tried to enforce referential integrety on again on a relationship with two fields, but again with the same result. > > Then I changed the datatype on the first field on both tables to autonumber/ numeric. But again I got the same result. > > Are you using access 2003? > > Peter > > ----- Allen Browne wrote: ----- > > Just tested here, Peter, and the relationship was created fine. > The example I tested used a Number (Long) + Text (20-char) in both tables. > > Make sure your field pair match on data type and size in both tables. > Remove any spurious indexes on the table, including any hidden indexes. > You may need to test this programmatically: > ? CurrentDb().TableDefs("YourPrimaryTable").Indexes.Count > > "Peter Johal" <anonymous@discussions.microsoft.com> wrote in message > news:973C56DA-A7FB-4B8A-8418-6FE7B50F4CCA@microsoft.com... > > I cannot turn on referential integrity on a relationship (parent-child) > with two field. Access gives the error message (translated from dutch): > >> No unique index has been found on field of primary table that is > references. (Error 3609) > >> However, the primairy key of the primary table consist of precisely the > two field in the relationship. So there is a unique index on those two > fields. > >> I'm using access 2003. Is this an error or a limition of access? What can > I do? > >> Peter
- Next message: Scott: "Sorting w/Primary Key"
- Previous message: Gary: "Firstname Lastname - Lastname, Firstname"
- In reply to: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Next in thread: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Reply: Peter Johal: "Re: Referential Integrity on relationship with Multiple fields"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|