473,320 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

No unique index found for the reference field of the primary table."

jinalpatel
I am getting this error when I try to enforce referencial integrity from Harvest II table to tractsum table I have attached the relationship diagram. Please give me the hint about possibilities of situation why this error occurs?

Thanks
Attached Files
File Type: zip YWMM DB relationships.zip (85.8 KB, 948 views)
Apr 3 '09 #1

✓ answered by NeoPa

Your attachment doesn't show the details of the link, but I suspect you have no unique index specified for the fields [Property] & [Comp_Tract 1] (taken together as a composite key).

Must they be unique? If so, define the index and you should be able to proceed past that point I would guess.

6 26259
RuralGuy
375 Expert 256MB
Does the Harvest II table have a PrimaryKey field?
Apr 3 '09 #2
Yes primary key is Property. It is one to many relationship. One Property can have multiple tract_sum.
Apr 3 '09 #3
RuralGuy
375 Expert 256MB
Why are there two fields from the Harvest II table in the TractSum table? What is the DataType of these fields?
Apr 3 '09 #4
NeoPa
32,556 Expert Mod 16PB
Your attachment doesn't show the details of the link, but I suspect you have no unique index specified for the fields [Property] & [Comp_Tract 1] (taken together as a composite key).

Must they be unique? If so, define the index and you should be able to proceed past that point I would guess.
Apr 4 '09 #5
Thanks you much guys!!
I found that there was no unique index set up for both the primary (composite key - in the table properties) I set that property to yes(with no duplicates) and it gave me another error saying that there is duplicate data in the table. I removed the duplicate data and it allowed me to enforce referencial integrity..Although it is weired that I tried 2-3 time before and it didn't work but finally it works fine.
Thanks much!!
Apr 8 '09 #6
RuralGuy
375 Expert 256MB
Thanks for posting back with your success.
Apr 8 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: aj | last post by:
DB2 WSE 8.1 FP5 Red Hat AS 2.1 What is the difference between adding a unique constraint like: ALTER TABLE <SCHEMA>.<TABLE> ADD CONSTRAINT CC1131378283225 UNIQUE ( <COL1>) ; and adding a...
4
by: deko | last post by:
I have a Make Table query that creates a fairly large table. The Make Table query populates the new table with one AutoNumber field (which is taken form another unrelated table as part of the...
10
by: deko | last post by:
I understand it's possible to make a composite Primary Key by holding down the control key and selecting multiple fields, then right-clicking and selecting Primary Key. But I've heard that's not a...
10
by: Laurence | last post by:
Hi there, How to differentiate between unique constraint and unique index? These are very similar but I cannot differentiate them? Could someone give me a hand? Thanks in advance
8
by: paii, Ron | last post by:
I have a table listing drawing numbers for jobs. It's primary key combines Job and numeric part of the drawing number. The structure allows the number part to repeat for each job. Job Dwg...
3
by: vj_dba | last post by:
Hi Group, I have a Primary key in my table. It's clear Primary key wont allow duplicates, this primary key creates one index for retrival. Suppose if my table is having a Unique index also....
4
by: bdockery | last post by:
Access 2007 I have a table with three columns. Country, State, City What I want to do is have a form where the Country, and State, lookups auto-populate when the city lookup is chosen. It...
0
by: muzu1232004 | last post by:
If I have a table t1 with a column a as follows A 1 1 1 1 1 1 1
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.