I want to be able to create a group of records at one time and guarantee that the identity field is continuous for the group (no breaks due to somebody else coming in and creating a record while this is in process). I'm assuming some kind of table lock would work, but I'm no sql guru so any advice would be appreciated (what type of lock? any possible issues? etc).
For a little background, the table structure is pretty simple...
TABLE PropertyCode
(
Code INT IDENTITY,
UserID INT
)
The property code is assigned to a property in the property table. Property codes can be re-used (they are printed on signs and the signs can be rotated amongst multiple properties). It is significantly cheaper to print a continuous sequence of numbers than random numbers on signs.