>I've read the example that ships with VFP5 about the creation of unique IDs using a stored procedure, but I don't understand how could I implement a similar solution for remote tables. I mean, how could I lock the remote table on the server to read the latest value, update it and then remove the lock ?
>There are probably many options for SQL server back-ends, but I only have remote views for the tables stored on the server...
>
>Any kind help ?
It works the same way on SQL Server with the syntax difference (HOLDLOCK)
*** Stored Procedure
Begin tran
Select @my_id=id from TSetup HOLDLOCK where code=55
Update TSetup Set id=@my_id+1 where code=55
Commit tran
Edward Pikman
Independent Consultant