Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
I used optimistic table buffering (5), and what I did was to compile the application into an EXE, and open two instances of the EXE with the same form.
I put EXE1 into edit mode, go to EXE2 and put it in edit mode, make changes in several records (of the child table in a one to many form), go to EXE1 and make changes in the same records, go to EXE2 save changes, go to EXE1 and save changes (which overwrited changes in EXE2 without complaining).
>That makes me afraid - I might have misunderstood something important, and may have to do some redesign.
>
>I will check when I am back home.
>
>Did you try the experiment as I suggested; opening the view twice, in two copies of a form? Or did you do another experiment? What sort of buffering did you use?
>
>>Hi Hilmar,
>>
>>I have done the test, and indeed you lose automatic conflict managment when you tell your view to check for "key fields only". Exactly speaking you don't lose it completely, you restrict conflict management to "key fields only", which is almost like losing it.
>>
>>VFP help is very clear at this respect. Opne the view desinger, go to the update criteria page on the page frame, and hit F1. You can read there that VFP generates a SQL WHERE clause that checks ONLY for what you specify there.
>>
>>So with views with many fields (I would say over 50 as my case), you can't rely on VFP conflict management.
>>
>>If you have tested otherwise, please let me know.
>>Thanks,
>>Javier.
>>
>>>
>>>Aha, I think I am beginning to understand. You mean that when VFP forces the update, it will not check if the fields were modified - and thus, generate a shorter statement.
>>>
>>>I think that VFP will check its buffers (the ones accesible with oldval()) with the value on disk, before committing changes.
>>>
>>>If you don't trust my opinion on this (and you shouldn't, when it comes to something as important as update conflicts), try the following: open the same form twice, and select the same record. Make changes in Form1, then in Form2. Save in Form1, then in Form2. If you don't force the update, you should not be able to save in the second form.
>>>
>>>>What I loose using "Key fields only" is the automatic conflict management, which I can do elsewhere.
>>>
>>>I don't think you lose conflict management if you use buffering. You will lose it, if you use forced updates - but that is quite a different issue.
>>>
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement