Thanks you Keith, but,
Is it'n necessary to use the clause
UPDATE DocNumber WITH (ROWLOCK)
?
>
>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.