Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Buffering, Detecting a Record Delete by Another Us
Message
De
18/09/1997 09:20:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00050289
Message ID:
00050546
Vues:
29
>>>>>>In VFP5 how do I detect if another user has deleted the current record when table buffering is used?

>>>
>>>Just a few thoughts.....
>>> GetFldState should work on the table therefore applies to all users. (but I have had problems with it in the past)
>>> If the record in question was marked for delete than recalled it will still show up as status changed.
>>> If the first number is returned as 2 then it could have been triggered by a edit also.
>>> Deleted() could be used.
>>>Correct me if anyone disagrees..........
>>
>>I have run test after test with two sessions of foxpro and GetFldState returns values based on the edits made in the current session only. Does any one have a reliable way to check the deletion status from disk when a table has record buffering enabled? Curval() returns the value of a field from disk, there should be some way to return deletion status from disk.
>
>Dan, I haven't tried this, but you could load 2 copies of the table in question. The first is used for editing. When you wish to check the delete status, USE MyTable AGAIN... and check the record in question with DELETED(). Slow, but accurate as of the time you do the USE...AGAIN command.
>
>Interesting problem...
>
>Barbara

Thanks! I tried this once before and it didn't work for me but I descided to try it again to make sure I had not done something wrong and it appears to work. I am working on a class that will merge all users edits to a record. I want to use this to inform a user that other edits have taken place and allow him/her to review the current status of the record. If another user has deleted the record I want to notify the current user that the record has been deleted. During the merge and delete test, the record is allready locked so the USE AGAIN will allways be accurate

Thanks for everyones help.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform