Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 6th, 2003, 09:10 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default Data Filling error after Relation

I have made a Relation in my 2 Tables but when I wanna fill the DataSet by DataAdapter It Gives me following error:

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.
PLEASE HELP ME, I become stuck in this simple problem!!!

Hovik Melkomian.
Hovik Melkomian.
Old July 31st, 2003, 09:00 AM
Registered User
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

When you fill the dataset using the data adapter's fill method, make sure you fill the parent table before the child table. This worked for me.
Old December 29th, 2004, 06:19 PM
Authorized User
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram

DataSet11.EnforceConstraints = False

Similar Threads
Thread Thread Starter Forum Replies Last Post
filling the combobox using sql data adapter kumaran BOOK: Professional .NET 2.0 Generics 4 October 5th, 2015 07:57 AM
Error when filling DataAdaptor.FIll jkusmanto ASP.NET 1.0 and 1.1 Basics 0 April 3rd, 2006 06:34 AM
filling a combo box from a data object allee_man Beginning VB 6 1 March 1st, 2005 08:08 AM
The "Right" command & zero filling the data chubnut SQL Server 2000 4 August 18th, 2004 09:29 PM
Filling in a list box with data from Access goplayoutside VB Databases Basics 7 April 21st, 2004 08:27 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.