Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Networked, multiuser, transaction, tableupdate, buffer e
Message
De
22/07/1997 14:05:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/07/1997 12:53: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:
00041150
Vues:
37
>
>operation 1
>operation 2
>...
>...
>...
>Begin Transaction
> select table1
> lsuccess =tableupdate(.T.)
> select table2
> fsuccess=tableupdate(.T.)
>
> if lsuccess=.F. or fsuccess=.f.
> end transaction
> else
> rollback
> endif
>
>Some questions about this piece of code.
>1. Does it mean that all real data writing(to disk) are made after issuing tableupdate, instead the operations before Begin transaction.
>2. I assume it to be in table buffering mode. If I am right, should I put a
>tablerevert before rollback?
>3. should I issue tableupdate to each table respectively?
>
>Many thanks.
>
>Best regards,
>Ron.

Begin..End transaction doesn't free you from writing tableupdate() if buffering is used or data won't be updated. Think begin..end transaction as interactively executing a series of commands. If you rollback at a point it means you didn't executed any of these (if supported by transaction). With or without transaction you would write tableupdates as necessary (end transaction doesn't make tableupdate). If you don't tableupdate or revert at a point it means like you quit or close the table without committing by update or revert. In case of issuing a rollback you don't need a tablerevert because you didn't do something to revert (rollback rolls you to the beginning)
One last thing, with transcation it doesn't differ if buffering is on or not and you can use a series of nested transactions (up to 5 currently).
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform