Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 sp3, Remote Views and SQL Server 6.5
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00295864
Message ID:
00296443
Vues:
29
Philip,

How do I prevent multiple users from viewing/working the same record at the same time? In our application we have groups of users that process the same list of records. They effectively leapfrog each other through the list. We currently accomplish this using record locking. Users can also search any record at any time. If the searched record is being worked by someone else they get read only access. Is logical record locking the only way to accomplish this (i.e. lock flag in record)? If yes, how do we prevent lock flags from being left set when the users pc crashes or gets powered off without the user logging out of the application?

>Those commands are native to VFP and work only with local tables. Remember that with remote views, your tables are in another database system entirely, with its own record locking scheme, referential integrity, etc. When you open a remote view, the result is simply a record set. Think of it as a plain old VFP cursor in memory, that you can add records to, delete records from, or modifiy data in. Your two major commands now will be TABLEUPDATE() and TABLEREVERT() to control updates back to the server.
>
>You usually never have to worry about locking records on the front end, as each user would have their own copy of the remote view in memory on their local machine. When they all try to update a changed record at the same time, it's the VFP buffering scheme and SQL Server locking mechanism that take over.
>
>We also once created an application that could flip from local tables (VFP) and server tables (SQL Server), and ended up using remote views for both. You can easily create remote views that work on your local VFP tables, then when you want to go to SQL Server, you just change the datasource of the connection and refresh the views (write a VFP script to do this). This, obviously, assumes you are using consistent table structures and data types on both sets of tables.
Shane Murdoch
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform