I have a Primary Key that is an integer
I have a DataTable that has many rows from which I have deleted some.
When adding a new row I query the DataTable for the Highest Number and Assign that Number + 1 to the primary key column of the new row.
When execute the Update command to the Data Adapter I get an error indicating possible Duplicate values in my Primary Column
I suspect that the primary key value that I am adding also belongs to one of my deleted rows.
How can I add a unique primary key value
Thanks
I have a DataTable that has many rows from which I have deleted some.
When adding a new row I query the DataTable for the Highest Number and Assign that Number + 1 to the primary key column of the new row.
When execute the Update command to the Data Adapter I get an error indicating possible Duplicate values in my Primary Column
I suspect that the primary key value that I am adding also belongs to one of my deleted rows.
How can I add a unique primary key value
Thanks