Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tip of the Day --- Views (Part Three)
Message
De
27/09/1999 23:53:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Tip of the Day --- Views (Part Three)
Divers
Thread ID:
00269787
Message ID:
00269787
Vues:
52
"How come my tables aren't getting updated when I update my view?"

A common problem and one that "bites" experienced developers and newbies alike.

When creating views, in the View Designer, it's easy to overlook identifying a Key field and/or checking-off the Send Updates checkbox. In views created in code, not setting the SendUpdates property of the view to .T. via DBSETPROP() or not identifying the key field with the KeyField set to .T. for the primary key of the underlying table is common.

In both circumstances, the base table will not be updated. If SendUpdates is not set True (.T.), VFP just won't try to update the base table. 'Nuff said. If a KeyField is not identified, and it has to be a unique key field (a primary key), VFP doesn't know where to send the updates.

Always check these settings via running GENDBC or DBGETPROP after you haev created a new view. It'll save you some headaches.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform