AutoIncrement in .NET and Autonumber in ACCESS

From my experience, try to avoid turning on both AutoIncrement (in DataColumn) in .NET and Autonumber in MSAccess at the same time. As somehow there is just no communication between them. They just work on their own.

For example, when you have records in ACCESS having ID (1,2,3,4) and suppose the next ID be 10 (as doing some record add and delete before). AutoIncrement in .NET just don't know about it as it's AutoIncrementSeed can just automatically set to 5.

Then 10 vs 5, I hope you can see how the problem being occurred. So avoid having them both at the same time.

Comments

Popular posts from this blog