Identity Column locking
Posted on 2004-09-21
I have a database with about 10 tables in it, each table has an ID field which is an identity with a seed of (1,1)
This generally works fine, but occasionally, I lose records which are written to the table.
If I look at the ID field, there are occasionally gaps between the numbers..
I'm not sure if I should be locking the record before I insert or whatever ??
Is there any other reason for gaps in the ID column ?? apart from someone deleting them obviously.