J
Joe
Given the following code new rows should have their AutoIncrement column set
to -1, -2, -3, etc... but this isn't the case.
When I inspect the new row it shows the last positive value -1 for the new
row yet when I look at the column both Auto properties are set as below. I
double verified by looking at the row than col like this:
datatable.Rows[45]["idx"] and the column datatable.Columns["idx"]. This way
I know I'm looking at the right item.
In addition, when inspecting the newrow I see that rowID = -1, newRecord
= -1.
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
da.Fill(dt);
foreach (DataColumn c in dt.Columns)
{
if (c.AutoIncrement == true)
{
c.AutoIncrementSeed = -1;
c.AutoIncrementStep = -1;
break;
}
}
I hope I'm just overlooking something.
to -1, -2, -3, etc... but this isn't the case.
When I inspect the new row it shows the last positive value -1 for the new
row yet when I look at the column both Auto properties are set as below. I
double verified by looking at the row than col like this:
datatable.Rows[45]["idx"] and the column datatable.Columns["idx"]. This way
I know I'm looking at the right item.
In addition, when inspecting the newrow I see that rowID = -1, newRecord
= -1.
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
da.Fill(dt);
foreach (DataColumn c in dt.Columns)
{
if (c.AutoIncrement == true)
{
c.AutoIncrementSeed = -1;
c.AutoIncrementStep = -1;
break;
}
}
I hope I'm just overlooking something.