Hello,
I have one dataset with a few tables. In one of the tables where I'm adding to, I would like to have a constraint where it will only allow to add a row if I have a unique value in a column.
Table: Users Columns: AutoID, GroupID, UnitID*, etc.
In the MVS2008, I went to the Designer and set the Unique property for UnitID to true
, but it didn't work.
I've also hard-coded where I add a row to: this.dataset.Users.UnitIDColumn.Unique = true
and tried a try/catch(InvalidConstraintException), but whenever I hard-code it in, I always get an exception even if the value is unique or not
How do I limit only adding a row with a unique UnitID? Thanks in advance.