Undo Changes to a table after SQL fill() command
Posted on 2006-06-01
I have a Data table that i fill from a SQLDataAdapter. The table has a unique column that triggers an error if data gets added with a row with duplicate data in that column, which i want it to do but i cant get the reject changes to then remove the rows that i have just added! here is the snippet of code that is not working.
SQLDa.SelectCommand.CommandText = "SELECT * FROM db WHERE ID = '123456'"
CompTBL.Columns("ID").Unique = True
Catch ex As Exception