>
>SQL Server performs table, page, and row-level locking automatically:
>
>
>
>declare @Next int
>
>begin transaction
> select @Next = invoice + 1 from DocsNumbers
> update DocsNumbers
> set invoice = @Next
>end transaction
>
>
>For more info about SQL locking, see "SET TRANSACTION ISOLATION LEVEL" in the BOL.
You don't need a transaction because it can be done in one UPDATE sytement. See
Record ID generator question Message #
611104
--sb--