I need to read and increment a value atomically in SQL Server 2008, using c#.
For example, I have to insert items of a \"lot\", for this i need the number of the last lo
The easiest way would be to just alter the table so that the lot number is an identity field and will auto-increment itself. Then you don't have to worry about incrementing in code.
identity