Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrapping all SQL updates into one transaction
Message
De
12/01/2000 11:31:43
 
 
À
12/01/2000 10:47:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00315804
Message ID:
00317010
Vues:
17
There is an approach to this which strikes me as simpler. Since I'm not real experienced in SQL Server, if this suggestion is not a good one in this context, I'd appreciate an explanation of why not so that I don't make a serious mistake myself.

The approach that occurs to me in this context is:
1) download all data needed for the update to the VFP client (including timestamps.)
2) Make all changes at the client end.
3) Begin the transaction at the server end
4) check to see if any of the records you are about to update have changed. If so abort transaction.
5) Update all files that need to be updated. You are now updating your files in immediate sequence -- no waiting for processing, importing from ASCII etc since this was all done on the client end.

6) If successful end the transaction -- otherwise execute a single rollback if you detect a failure. While you still have to rely on Server and OS protocols to execute the rollback in case of lost connections, crashes and such you are exposed to this for a much shorter period of time.


7) Again, while a good VFP person, I have very little SQL server experience -- so if this is an awful suggestion, explaining why would be a useful learning experience for me.

Thanks

Gar
Thanks

Gar W. Lipow
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform