In C#.NET, I'm attempting to create a window-based application. I'm reading data from a csv file into a data grid view before inserting it into a database. I use
to database to insert data from csv file. My main worry is that I keep receiving primary key constraint errors when I attempt to put data into databases that already contain data. If it's feasible to compare values before putting them into a database utilizing
Update should occur if the value is present in the database.
Can someone explain the rationale behind this?
Set the "Ignore Dupes" option on the index for the PK if you are absolutely certain that the dupes are not required.