RowState case (Solved)
May be someone knows, what's happend:
I use DataTable dtPotr with Serial column on MSSQL (string - because of I use it with many databases):
dtPotr.Columns.Add("nrrek",typeof(String));
Next, I add some rows to it (serial is temporary 0):
dPotr.Rows.Add(new object[]{ "0",.... });
Next, I set serial values (properValue is int) in loop:
foreach(DataRow dr in dtPotr.Rows) dr["nrrek"]=properValue;
Some of records (about half) have RowState changed from Inserted to Modified after it ...
SORRY. It's my error. I found AcceptChanges() before loop in some cases.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

send2manivannanRank #8,059 · 229 reputationPosted May 28, 2004, 1:39 AM EDT