Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Networked, multiuser, transaction, tableupdate, buffer e
Message
De
23/07/1997 10:53:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/07/1997 06:17:24
Ron Tse-Jung Huang
Leader Professional Consulting
Shin-Chu, Taiwan
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041098
Message ID:
00041337
Vues:
52
>Thanks, I have tried to write something using these commands, and I am now much much more clear about these. But one more thing I would like to ask about tableupdate. It seems that the content change by tableupdate is still not permanent. It still can be undone with rollback, right?
>
>Regards,
>Ron
You're so right with that Ron. That is the difference between tablerevert and rollback.
begin transaction
insert into anytable (....) values (val1,val2)
tableupdate() && Will be permanent if sucessfull and an "end transaction" is encountered
tablerevert() && This has really no effect - Only rollback can do it
rollback
end transaction && This also has no effect and a mismatch for already a rollback encountered
is equivalent to
*Do nothing and the rec is not inserted

But in case of just buffering commands code behaves different.:
insert into anytable (....) values (val1,val2)
tableupdate() && Update committed and nonreversible - Permanent here if sucessfull.
tablerevert() && Nothing to revert- Already committed.

Rec is inserted.
Without buffering only rollback can revert.
Another point :
*begin transaction && If using nested transaction remove *
insert into anytable (....) values (val1,val2)
replace afld1 with "My value"
begin transaction
replace afld1 with "Dummy value"
tableupdate() && Will be permanent if sucessfull and an "end transaction" is encountered
rollback
tableupdate()
*end transaction && If using nested transaction remove *
In this case with or witout an outer transaction, afld1 will have a value of "My value" because begin trans. .. rollback part will act like a rem.
Regards
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform