Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View not updating data
Message
 
 
À
09/08/2006 09:58:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01143996
Message ID:
01144122
Vues:
26
>Thanks Naomi,
>
>I keep getting the error "No key columns are specified for the update table "Guinty!PKG". Use the keyfield property of the cursor" Excuse my ignorance, but how do I set this key field? I have used all kinds of permutations and combinations in the view designer's Update Criteria tab, and yes, treating one as updatable, and one as the parent(non updatable). I'm sure I've done something stupid, but not sure what. Any suggestions, please?
>
>Regards,
>
>Steve.

What is the PK for your table? In the View designer you should set this field as a key field (it would have two checks for the field in the designer). I also never tried distinct clause for updatable view. Usually the view is based on one table. Here is a sample of updatable view:
SELECT Accidents.*;
 FROM ;
     mmviscollect!accidents;
 WHERE  Accidents.caccidents_pk == ( ?vp_cAccidents_pk )

DBSetProp(ThisView,"View","SendUpdates",.T.)
DBSetProp(ThisView,"View","BatchUpdateCount",1)
DBSetProp(ThisView,"View","CompareMemo",.T.)
DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
DBSetProp(ThisView,"View","FetchMemo",.T.)
DBSetProp(ThisView,"View","FetchSize",100)
DBSetProp(ThisView,"View","MaxRecords",-1)
DBSetProp(ThisView,"View","Prepared",.F.)
DBSetProp(ThisView,"View","UpdateType",1)
DBSetProp(ThisView,"View","UseMemoSize",255)
DBSetProp(ThisView,"View","Tables","mmviscollect!accidents")
DBSetProp(ThisView,"View","WhereType",3)

DBSetProp(ThisView+".caccidents_pk","Field","Comment","ACCIDENTS KEY")
DBSetProp(ThisView+".caccidents_pk","Field","DataType","C(16)")
DBSetProp(ThisView+".caccidents_pk","Field","UpdateName","mmviscollect!accidents.caccidents_pk")
DBSetProp(ThisView+".caccidents_pk","Field","KeyField",.T.)
DBSetProp(ThisView+".caccidents_pk","Field","Updatable",.T.)
<snip>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform