Hello,
I have a Table Machines that made of:
ID = Identity , Primary , AutoIncrement,NOT NULL
SN = Unique , String , NOT NULL
Name =String
now I am using a form to insert data into this table,
and I am using BindingSource and ErrorProvider,
I am handling Null and Empty string in the DataSet layer (partial class in the dataset.xsd),
now when I try to end editing
this.machinesBindingSource.EndEdit();
I got this error message:
ex.Message = "Column 'SN' is constrained to be unique. Value '123' is already present."
I know I entered a duplicated value
but the question is HOW can I determine which the columnName that cause the error and re-write the error message entirely in different language
I want to get the columnName and the wrong value
thanks in advance