I have a table and data as follows.
and a dataset as follows.
here qty for id=1 in the table1 is 5 and the no. of items in the dataset is 5. how can I prevent users adding another item into the dataset with id=1 or id=2 (qty is 2 for id=2 in the table.) I am using asp.net 4 and sql 2005. the sql connection string, commands and dataset are already created.