Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FLock & Rlock
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00954872
Message ID:
00954973
Vues:
31
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform