Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Failed to enable constraints... when there are none!

Reply
Thread Tools

Failed to enable constraints... when there are none!

 
 
Jeff
Guest
Posts: n/a
 
      10-24-2006
I've been having this problem for weeks and its been stumping me. By
the way, Im working with MS SQL 2000, ASP.NET2 and Visual Studio 2005.
I am recieving an error, when executing a SELECT statement from an
ObjectDataSource thorugh a strongly typed DataSet DAL:

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

There are no foreign key constraints on my database, and the data being
selected is neither null nor an identity. Actually, the error is only
thrown when one of the columns being returned contains a specific
value. Removing the column from the select statement or changing the
data to a different value causes the page to run properly.

My best guess is that VS05 is misconfiguring the DataSets. However,
I've tried (among lots of other things) deleting and rebuilding the
TableAdapters with the same error persisting.

Help please! Thanks!

Jeff

 
Reply With Quote
 
 
 
 
LosManos
Guest
Posts: n/a
 
      10-24-2006
hejdig.

The dataset/datatable contains a collection of errors. Look through it to
find exactly which row/column/value is generating the error.

The question is also not related to aspnet but to adonet. Please use
another newsgroup.

HTH

/OF

--------

> "Jeff" wrote
> I've been having this problem for weeks and its been stumping me. By
> the way, Im working with MS SQL 2000, ASP.NET2 and Visual Studio 2005.
> I am recieving an error, when executing a SELECT statement from an
> ObjectDataSource thorugh a strongly typed DataSet DAL:
> Failed to enable constraints. One or more rows contain values violating
> non-null, unique, or foreign-key constraints.
> There are no foreign key constraints on my database, and the data being
> selected is neither null nor an identity. Actually, the error is only
> thrown when one of the columns being returned contains a specific
> value. Removing the column from the select statement or changing the
> data to a different value causes the page to run properly.
> My best guess is that VS05 is misconfiguring the DataSets. However,
> I've tried (among lots of other things) deleting and rebuilding the
> TableAdapters with the same error persisting.



 
Reply With Quote
 
 
 
 
Jeff
Guest
Posts: n/a
 
      10-24-2006
Thanks for the reply and the direction.

I know which row and column is generating the error. My problem is that
I can't make sense of the error statement given the fact that the data
should be valid in every way.

LosManos wrote:
> hejdig.
>
> The dataset/datatable contains a collection of errors. Look through it to
> find exactly which row/column/value is generating the error.
>
> The question is also not related to aspnet but to adonet. Please use
> another newsgroup.
>
> HTH
>
> /OF
>
> --------
>
> > "Jeff" wrote
> > I've been having this problem for weeks and its been stumping me. By
> > the way, Im working with MS SQL 2000, ASP.NET2 and Visual Studio 2005.
> > I am recieving an error, when executing a SELECT statement from an
> > ObjectDataSource thorugh a strongly typed DataSet DAL:
> > Failed to enable constraints. One or more rows contain values violating
> > non-null, unique, or foreign-key constraints.
> > There are no foreign key constraints on my database, and the data being
> > selected is neither null nor an identity. Actually, the error is only
> > thrown when one of the columns being returned contains a specific
> > value. Removing the column from the select statement or changing the
> > data to a different value causes the page to run properly.
> > My best guess is that VS05 is misconfiguring the DataSets. However,
> > I've tried (among lots of other things) deleting and rebuilding the
> > TableAdapters with the same error persisting.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Bobby Edward ASP .Net 4 11-03-2008 10:53 PM
Gridview error: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Bobby Edward ASP .Net 1 10-14-2008 04:09 AM
Failed to enable constraints cs_in_va ASP .Net Web Controls 3 02-19-2008 11:58 PM
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. bazzer ASP .Net 1 04-06-2006 01:31 PM
How to enable people to pay me....(enable credit card payments in my web app) Patrick ASP .Net 1 11-10-2005 11:07 AM



Advertisments