Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When to TableRevert and When to Delete When Adding
Message
De
22/08/2001 02:43:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/08/2001 13:48:48
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00546881
Message ID:
00547114
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
>I've been reading a lot about this lately, but still don't have a handle on it. When adding a record to a view and then deciding to cancel before saving, what is the best way to get rid of the new record in the view? Delete seems dangerous and I'm not exactly sure how/when to use TableRevert. If TableUpdate commits changes to the base table, does TableRevert only affect the view? If so, if TableUpdate hasn't been issued, does a Requery provide the same thing? Thanks!
>
>Regards, Renoir

Renoir,
A view opens with buffering by default and base is nonbuffered. Until a tableupdate on the view itself nothing gets to the base tables. Thus a requery w/o a tableupdate in a way behaves like tablerevert(.t.). OTOH a requery might be time consuming. Think of a view as if it was the base table itself with buffering. If you use tablebuffering, and at a time decide to save 5 out of 8 edited/added records, tablerevert(.f.) for those 3 unwanted then tableupdate(.t.) (or per record for this one too). If you're using rowbuffering than either tablerevert() or requery.
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