J
James Cadd
DataLayer's steps:
1. DataAdapter.Update(dtUserChanges)
2. DataAdapter.Fill(dtUserChanges)
I'm having trouble with DataAdapter.Fill creating
duplicate rows in a table which has an AutoIncrement
primary key. When it happens, I get a
ConstraintException thrown from the Fill method. I know
it's happening because, to keep the DataSet mergeable, I
handle DataAdapter.RowUpdating and set
sqlRowUpdatedEventArgs.Status =
UpdateStatus.SkipCurrentRow. What's a good way to deal
with this problem?
1. DataAdapter.Update(dtUserChanges)
2. DataAdapter.Fill(dtUserChanges)
I'm having trouble with DataAdapter.Fill creating
duplicate rows in a table which has an AutoIncrement
primary key. When it happens, I get a
ConstraintException thrown from the Fill method. I know
it's happening because, to keep the DataSet mergeable, I
handle DataAdapter.RowUpdating and set
sqlRowUpdatedEventArgs.Status =
UpdateStatus.SkipCurrentRow. What's a good way to deal
with this problem?