Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FLock & Rlock
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00954872
Message ID:
00954973
Views:
29
This message has been marked as a message which has helped to the initial question of the thread.
Hi Gregorio,

>But the problem is how I going to make record locking if Remote view look like does not perform that task.

On SQL Server I often use a separate locking table with a table and an ID field. Both are marked as primary keys. In the application I create a separate, asychronous connection with manual transactions just to access the locking table. When I need to lock a certain record, I insert a record with the table name and ID, but do not commit the transaction. To unlock, I issue a SQLROLLBACK(). For me this works, because I typically need to unlock all records at once when the user is done with editing a record.

If another user tries to lock the same record, SQL server blocks the operation. On the client side I'm waiting for a response for a certain timeout period. After that period I cancel execution with SQLCANCEL() and report a locking error to the user.

--
Christof
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform