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 09:25:34
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
22/08/2001 02:43:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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:
00547193
Vues:
24
>>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

Cetin,

The issue of the added record is still a problem. After adding a record to a view, then issuing a TableRevert, the field value are reverted, but the record itself still exists in the view. The only way I can remove the added record from the view is by Requery. Is this how it should be or do I have something else going on?

Renoir

Vlad: FYI as your response was basically the same as Cetin's
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform