Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default unique ID values for a field in a remote table ?
Message
From
01/06/1998 13:52:23
 
 
To
01/06/1998 13:43:35
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00103696
Message ID:
00103699
Views:
32
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform