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

Discussion in 'ASP .Net' started by Jeff, Oct 24, 2006.

  1. Jeff

    Jeff Guest

    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
     
    Jeff, Oct 24, 2006
    #1
    1. Advertising

  2. Jeff

    LosManos Guest

    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.
     
    LosManos, Oct 24, 2006
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    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.
     
    Jeff, Oct 24, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bazzer
    Replies:
    1
    Views:
    4,985
    =?Utf-8?B?Y2xpY2tvbg==?=
    Apr 6, 2006
  2. length power
    Replies:
    2
    Views:
    105
    Rustom Mody
    Apr 10, 2014
  3. Skip Montanaro
    Replies:
    0
    Views:
    71
    Skip Montanaro
    Apr 10, 2014
  4. Johannes Schneider

    Re: why i have the output of [None, None, None]

    Johannes Schneider, Apr 10, 2014, in forum: Python
    Replies:
    0
    Views:
    61
    Johannes Schneider
    Apr 10, 2014
  5. Terry Reedy
    Replies:
    0
    Views:
    67
    Terry Reedy
    Apr 10, 2014
Loading...

Share This Page