473,513 Members | 2,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error 3386: Relationships Must Be on Same Number of Fields

Hi Everybody-

I know that this is a really, really long post, but I wanted to try to
give you as much background as possible.

So here's a quick overview of the issues I'm asking for help with:

1.) I'm trying to create a many to many relationship, and I get the
following Error when I try to enforce referential integrity.

Error 3386: Relationships must be on the same number of fields with
the same data types.

2.) I need some advice on creating some Tables and Relationships.
Each CASE can have one or more ISSUES. Therefore, I created a Bridge
Entity/ Table called CASE_ISSUE.
Each ISSUE can have one and only one DECISION.
But each DECISION can be associated with one or more ISSUES.
So, I created a Bridge Entity/ Table called ISSUE_DECISION.

For example:

A CASE can have the ISSUEs, Age Discrimination and Illegal Drug Use.

A CASE can have the ISSUE, Sexual Harassment.
The ISSUE, Age Discrimination, can have the DECISION, Guilty or Not
Guilty.

The ISSUE, Illegal Drug Use, can have the DECISION, Guilty or Not
Guilty.

The ISSUE, Sexual Harassment, can have the DECISION, Guilty or Not
Guilty.
The DECISION, Guilty or Not Guilty, can be associated with any of the
ISSUEs, Age Discrimination, Illegal Drug Use, or Sexual Harassment.
Each ISSUE has one DECISION. But a DECISION can be associated with one
or more ISSUES.

Right now, I've got a table, ISSUE, listing over 100 different issues.
I've also got a table, DECISION, that lists the 20 decisions that can
be applied to those issues.

Maybe I've got my relationships messed up. Right now, I've got a many
to many relationship between ISSUE and DECISION with the bridge table,
ISSUE_DECISION.

Maybe I need a one to many relationship between DECISION and ISSUE?
But if I do that, then I'll need to add the attribute, DecisionID, to
the ISSUE table, right?

BUT...I'm using combo-boxes to display the descriptions of the Issues
and Decisions. These combo-boxes are linked to the tables, ISSUE and
DECISION, to retrieve the descriptions.

Here's where I'm going...

CASE table:
CaseID (Autonumber & Primary Key)
LastName
FirstName
Other attributes...

CASE_ISSUE
CaseID (Number & Primary Key)
IssueID (Number & Primary Key)
NOTE: I'm thinking about creating a New Primary Key called
"Case_Issue" instead of having CaseID and and IssueID as the Composite
Primary Key (Is this the correct term?)

ISSUE table:
IssueID (Number & Primary KEY)
IssueDescription (Text)

DECISION table:
DecisionID (Number & Primary Key)
DecisionDescription (Text)

ISSUE_DECISION table:
IssueDecisionID (Autonumber & Primary Key)
CaseID
IssueID (Foreign Key to ISSUE table)
DecisionID (Foreign Key to DECISION table)

When I try to create a one to many relationship between the ISSUE
table and ISSUE_DECISION table by dragging "IssueID" from
ISSUE_DECISION to ISSUE, I get "ERROR 3386: Relationships must be on
the same number of fields with the same data types."

Well, maybe I should give you some examples of what the tables look
like with sample data in them.

************************************************** ***************************

CASE table:

*CaseID* LastName FirstName
100 Simpson Jessica
200 Lachey Nick
300 Trump Donald

ISSUE table:

*IssueID* IssueDescription
1 Age
2 Sexual Harassment
3 Drugs

CASE_ISSUE table:

*CaseID* *IssueID*
100 1
100 3
300 2
300 3

DECISION table:

*DecisionID* DecisionDescription
10 Guilty
20 Not Guilty
30 Compliance
40 Non-Compliance

ISSUE_DECISION table

*IssueDecisionID* CaseID IssueID DecisionID
1 100 1 20
2 100 3 30
3 300 2 10
4 300 3 40

************************************************** ***************************

NOTE: I have a many to many relationship between the tables, CASE and
ISSUE, with the Bridge table, CASE_ISSUE. I CAN create the one to many
relationships here.

When I drag CASE_ISSUE.CaseID to CASE.CaseID, I CAN click "Enforce
Referential Integrity," and when I drag CASE_ISSUE.IssueID to
ISSUE.IssueID, I CAN ALSO click "Enforce Referential Integrity."

BUT When I try to drag ISSUE_DECISION.IssueID to ISSUE.IssueID and
click "Enforce Referential Integrity", I get the "ERROR 3386:
Relationships must be on the same number of fields with the same data
type."

OR when I try to drag ISSUE_DECISION.DecisionID to DECISION.DecisionID
and click "Enforce Referential Integrity", I get the "ERROR 3386:
Relationships must be on the same number of fields with the same data
type."

Questions:

1.) Do I need to create the Relationships before I populate the Tables
with data? But my tables: CASE, ISSUE, and CASE_ISSUE have data in
them, and I can create the relationships and "Enforce Referential
Integrity>"

2.) Why do I get this Error in some circumstances and not others?

3.) What kind of relationship should I create between ISSUE and
DECISION? Right now, each table provides the data for combo-boxes that
the user can select the Issue and Decision from.

Thanks for reading this post!!! I know it is really, really long! I
just wanted to try to give you as much background as possible.

I truly appreciate your TIME and EFFORT!

Megan
Nov 12 '05 #1
0 5457

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2714
by: Frances | last post by:
Hi All, I'm having a problem trying to add a record to a simple Access 2000 db (db is very similar to an address book but with more info than the usual address, phone, etc.). The database is...
6
1939
by: Chuck Van Den Corput | last post by:
I have an application with one main table with a jillion attributes. There are numerous other tables, but these are either children of the main table or lookup tables. I am finding that I am...
0
1481
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with:...
2
4117
by: Max | last post by:
Hi. I really hope someone can help me. Going slowly insane with this problem. I have a two Access 2000 databases. One is the backend containing tables and some admin queries. The other is the...
4
2125
by: Bri | last post by:
Hi, First let me explain the process I have going on, then I'll address the problems I'm having: 1) Insert records in a temp table using a query 2) Using a query that joins the temp table with...
7
2113
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A...
5
1847
by: Kosmos | last post by:
Hey :) hopefully someone can help me with this...I decided to take on the task of programming an access database for my legal co-op/internship...I'm studying law and music production on the...
2
3392
by: HNewt | last post by:
Access Error #2335 Access 2003. OS: Win XP Pro For a client I have created a database to track customers details and purchases. I have designed a form for data entry, the form is tabbed, the...
3
2068
ebs57
by: ebs57 | last post by:
I am looking for some basic help in understanding and setting up table relationships in Access. I've created one table called PROJECTS and it has the field JobNo which I've declared as the key...
1
1225
by: David Fairbrother | last post by:
Hiya folks, I'm trying to put together a database for student involvement in school sport activities. I'm not exactly what you'd call "proficent" in Access, so my apologies if I'm making some very...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.