XML relationship ADO.net

robbycraig

Member
Joined
Mar 2, 2006
Messages
7
Programming Experience
1-3
Hi I am accessing an sql server 2000 database with a visual basic .net frontend from visual studio .net 2002.
I have a parent and child table (more specifically a calibration table and calibration attempts table) in my form I am displaying the calibration then have a datagrid to display the individual calibration attempts.
So I have a data adapter that selects the data from both tables and I create a dataset then create the relationship in my xml dataset.
If I preview my data by right clicking my dataadapter and filling my dataset it shows the realtionship and if I click on it it shows the related data.
When I run my form and fill my dataset I get an error

VB.NET:
An unhandled exception of type 'System.Data.ConstraintException' occurred in system.data.dll
Additional information: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
 
/CODE]
 
I have striped my two tables down to the minimum of data and there are is no data that could violate these constraints, and as it works when I preview the data surely it should work when I run my code.
 
Any help would be greatly appreciated
 
Back
Top