Typed DataSet, Refresh in VS 2005?

Discussion in 'ASP .Net' started by Liming, Apr 21, 2006.

  1. Liming

    Liming Guest

    Hi,

    I designed a few DataSet Tables in the typed dataset dsigner. Recently,
    I encountered an error saying

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

    I didn't have any relations or non null values in the table, so I
    didn't know what was going on. I debugged by manually query the same
    sql and injected it into the typed datatable. When errors happen, I
    loop through each row in errors and the columns in error and found out
    that one my column's value exceeded the maxium length allowed. I
    printed out the maxium length, it was "10" when in database, it's "50".

    The issue here is, originally when the data table was added into the
    designer, db had a value "10".. I changed it later to "50".. but the
    dataset designer did not reflect this new change and now an error was
    thrown (if I didn't know how to manually loop through the error rows, I
    wouldn't even know what happened)

    I'm wondering how do you tell VS2005 designer to refresh its datatable
    definition? I don't see a "refresh" option or anything. (right now, I
    just go manually update it) But it would be nice to have a refersh
    option.

    In addition, why that when I was inserting, no error happened? How do
    you make it so that it auto truncate anystring that exceed the allowed
    maxlenght?

    Thanks.
     
    Liming, Apr 21, 2006
    #1
    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. Nedu N
    Replies:
    1
    Views:
    1,828
    Chris Taylor
    Oct 31, 2003
  2. Nedu N
    Replies:
    2
    Views:
    2,193
  3. William Gower
    Replies:
    2
    Views:
    4,180
    Brian Baker [MVP]
    Jul 26, 2004
  4. thomson
    Replies:
    2
    Views:
    14,858
    Eliyahu Goldin
    Jan 19, 2005
  5. Nedu N
    Replies:
    2
    Views:
    234
    Jacob Yang [MSFT]
    Oct 31, 2003
Loading...

Share This Page