System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint ;PK_share1;. Cannot insert duplicate key in object ;dbo.share1&. The duplicate key value is (4008).
if (changes != null) { foreach (DataTable table in changes.Tables) { foreach (DataRow dr in table.Rows) { try { adapter.Update(changes); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } } }
adapter.ContinueUpdateOnError = true; adapter.Update(changes);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)