Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace all can't lock header
Message
De
02/12/1997 09:55:40
 
 
À
02/12/1997 09:49:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00063169
Message ID:
00063270
Vues:
62
>>>>SET LOCK ?
>>>>
>>>>Vlad
>>>>
>>>>>I have several utilities in my app that use the REPLACE ALL command, as well as the DELETE all command. I am aware that both of these statements lock the table header during their execution, so that that no other changes can be made before they finish. This is a limitation I have been able to live with thus far. I just returned from vacation, and now all of these utilities don't work with other people in the tables. This has never been a problem before, and I can't figure out what could have changed. All of the sudden, any time I try to issue a REPLACE ALL, from the command window (on my machine or any other machine) or one is issued in code from the app, I either get an error message ("File is in use by another") or a wait window ("Attempting to lock...") depending on the REPROCESS setting in the current datasession. What have I changed to cause this?
>>>
>>>Well, that was my first guess too, but on checking in help, I found that SET LOCK doesn't apply to REPLACE ALL and DELETE ALL. From what I understand these statements lock the table all of the time, no matter what. What I don't understand is why they can't do it now, and they could before. This is causing MAJOR problems for us; any insight that anyone could give would be greatly appreciated. Thanks.
>>
>>What kind of locking mechanism do you use in edit screens?
>
>I think you have pegged it, Edward. I had recently switched a few of my edit button classes on certain screens to buttons that issue an rlock(). The purpose was to prevent concurrent edits of the same record, but it never occured to me that this would affect REPLACE ALL and DELETE ALL. I had done this before a 2 week vacation, and not noticed the problem until I returned, so the cause and effect didn't click in my head. Thanks again.

Probably, it's the case. The way to provide some ALL (replace or delete) operations is either make it 'administrative utility with exclusive usage' or do it the same way as RI code arranged. If you open RI procedures you will see that they use Transaction-Scan-Rlock mechanism.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform