Reputation: 659
What does it means if AutoIncrementSeed property has value -1 ?
Upvotes: 1
Views: 807
Reputation: 11
The schema of sql server table along with the data, couldn't override the AutoNumber Increment.
have to take this code out
Adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
Upvotes: 1
Reputation: 365
This means the new ids will start being allocated from the number -1. If it is coupled with an auto increment step of -1, the new IDs will decrease: ie, -1, -2, -3, etc. This is valuable for allocating IDs in a dataset before the dataset is saved to the actual database - the negative numbers help you easily identify unsaved records and can be automatically updated with positive IDs after the save.
Hope this helps, Steve
Upvotes: 1