>You don't need a record lock in SQL Server to do that. See
Re: Record ID generator question Message #
611104.
Well, as we have in VFP since a while, I assume SQL Server can generate the primary key ID without any code, right? The goal of the function I have is to be compliant with or without that support from the backend. I was looking for a way to be compliant with the existing table structure we have with the ability to move to SQL Server, when desired, without changing the data design.