none
Problems with relation on same table and TableAdapter.Update RRS feed

  • Question

  • Hi,

    I'm using a typed dataset with a TableAdapter and its Update method to commit changes on a table to the database.
    The table has a primary key and a foreign key (ParentID) which relates to the primary key of the same table. Of course therefore I created a relation in the Dataset Designer. As suggested I set seed and increment of the auto increment primary key column to -1. But when I try to add some rows, where some of them have other not yet added rows as parent, I get such values like -1, -2, -3 and so on as ParentID.
    It seems that the rows havent's been updated to the new assigned IDs after the insert, although I use SQL Server Express 2005.

    I've spent hours of searching in the forums but were not successfull till now.
    Please help!

    Thanks!

    Friday, November 9, 2007 11:23 AM

All replies