Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do program transaction within transaction
Message
 
À
08/06/2010 08:56:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01467775
Message ID:
01467924
Vues:
44
>on form1
>BEGIN TRANSACTION
>* create form2 on the form1.datasession
> * on form2
> BEGIN TRANSACTION
> * edit data
> * form2.save -> END TRANSACTION
> * form2.undo -> ROLLBACK
>* form1.save -> END TRANSACTION
>* form1.undo -> ROLLBACK
>
>you cannot edit two form2 at the same time

The biggest problem I see with this approach is that the user might leave the form(s) open for hours, making all the records in both tables (or any table updated in the transactions) unavailable, and even if the user does his/her job fast, there might be many fields to fill with the same effect.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform