F
fh
Hello,
I use a typed dataset in one table I have
this.columnID.AutoIncrement = true;
I thought that would let the dataset dealing with the generation of
primary key.
but when I insert a new datarow that way:
DataRow drDowntimeSup = _dsDowntime.Tables["PPE_DOWNTIME"].NewRow();
drDowntimeSup.BeginEdit();
drDowntimeSup.ItemArray= drCurentLine.ItemArray;
//drCurentLine is an existing line
.......... I changed some columns, not the "ID" column.
drDowntimeSup.EndEdit();
_dsDowntime.Tables["PPE_DOWNTIME"].Rows.Add(drDowntimeSup);
I receive the following:
->Column 'ID' is constrained to be unique. Value '33771' is already present.
Am I missing something?
thank you
Franck
I use a typed dataset in one table I have
this.columnID.AutoIncrement = true;
I thought that would let the dataset dealing with the generation of
primary key.
but when I insert a new datarow that way:
DataRow drDowntimeSup = _dsDowntime.Tables["PPE_DOWNTIME"].NewRow();
drDowntimeSup.BeginEdit();
drDowntimeSup.ItemArray= drCurentLine.ItemArray;
//drCurentLine is an existing line
.......... I changed some columns, not the "ID" column.
drDowntimeSup.EndEdit();
_dsDowntime.Tables["PPE_DOWNTIME"].Rows.Add(drDowntimeSup);
I receive the following:
->Column 'ID' is constrained to be unique. Value '33771' is already present.
Am I missing something?
thank you
Franck