Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TableUpdate and SQL string is too long
Message
De
11/11/2004 17:27:04
 
 
À
11/11/2004 16:59:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00959751
Message ID:
00960663
Vues:
15
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
Fil
Voir

Click here to load this message in the networking platform