473,394 Members | 1,702 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,394 software developers and data experts.

Cannot get simple Foreign key setup in C# VS express!

I am making two tables in a DBASE - Giving and Members -- The Members has a primary key of HouseholdName with all the member details (address, name, etc.) ---



The Giving table uses a PK ID.



I go to the Dataset designer and I click on the HouseholdName (PK) in the Members table and drag to the HouseholdName in the Giving table --- a menu pops up and I select Foreign Key Constraint only.



I want every giving instance to have a HouseholdName attached.... simple right???



NOT -- I put in a couple rows of data -- the HouseHold name FK in Giving has the same names as the ones in the Members table (see below) but when I run it, I get this error:



Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.



I have checked and re-checked and do not know what is wrong. *** I know the names are the same, the types are the same... I even tried dragging the OTHER way in my Diagram and still got the same error.... can someone please help me?



Thanks!!!!



GIVING TABLE:

1 7/1/2007 12:00:00 AM G 100.0000 VanceTE
2 7/4/2007 12:00:00 AM T 300.0000 LarsonJL
3 6/5/2007 12:00:00 AM T 450.0000 VanceTE




MEMBERS TABLE:

AndersonAA John Anderson 111 Blvd Chatham IL 61111
BakerBB Paul & Doris Baker 222 Street Springfield IL 62222
LarsonJL John & Blaine Larson 111 Avenue Auburn IL 61111
VanceTE Todd & Dawn Vance 1560 W. Decatur Decatur IL 62522
Aug 15 '07 #1
1 1342
Plater
7,872 Expert 4TB
Only thing I can think of is that the foreign key constraint is thinking it has to be unique.
Maybe you need a foreign index or something, I'm not sure what their interpretation of a "foreign key" is
Aug 15 '07 #2

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

Similar topics

3
by: Ryno Rijnsburger | last post by:
I am busy packaging our product as a standard Setup project in VS.NET that uses a bunch of merge modules (basically, a merge module for every key infrastructure component in our system). Part...
1
by: Dave | last post by:
Hi All, I have a VS.NET 2003 solution that uses several setup projects to package various components and applications into MSI files. I need to provide foreign language support for 5-6 languages...
7
by: Wayne Brantley | last post by:
I have found what appears to be an error in streaming with Datasets. It causes an error of 'Cannot find relation 0' when recreating the dataset from a stream. Here is how you reproduce it. ...
1
by: Thomas T. Thai | last post by:
I'm looking for a better way to make use of foreign keys. Here is a sample setup: -- TESTING Foreign Keys create table mod ( mod_id int not null primary key, name varchar(32) not null...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
0
by: Steve | last post by:
Hi All I have a vb.net Windows forms App which I am deploying with a VS.net 2005 deployment project I have selected SQL Server express as a prerequisite and use the standard SQL server express...
2
by: TTT | last post by:
Hi, I have developed a website from the model "Starter kits Classified". Well, the application works good, no problem in my development environment. It uses a SqlServer 2005 express database...
2
by: Aussie Rules | last post by:
Hi, I have a vb.net application that uses a SQL Express database. The end user already has SQL Express setup on there server, but they have no skills at using it. Is there a way I can have my...
4
by: michaelg | last post by:
Hi there, I previously posted this to the DB2-Express-C forum at ibm.com, but this group seems to get more traffic so I've reposted it here. The previous (off-group) post is at the URL below and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.