Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird problem
Message
De
16/03/2006 20:29:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01104771
Message ID:
01105169
Vues:
25
Geoff, I think the problem is that when you insert the record, it has no primary key. SCAN or REPLACE then moves the record counter, causing the new record to be saved if you have buffering=3. I'm assuming there is a primary key in the underlying table. The scan/replace then comes back to the "new" record and tries to change it. But since the data has been saved, you'd need to know the primary key to edit it. As you do not, the record is treated as a new, blank record.

One solution is to use table buffering and do an update at the end. You'll then need to requery the view to get the primary key if you want to change the newly added record again.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform