Hi,
the problem is that my scrip stops if a duplicate key is found and i would like to know how to handle duplicate inserts into database and if founded ignore and don't insert the data or handle the type of error.
try{
cmd.CommandText = "Insert into subscritor .....
cmd.ExecuteNonQuery();
}
catch (SqlException exc)
{
//what do i say for duplicate values?
}
throw;