I was hoping that wasn't the case.
I am trying to get my data to update back to the underlying table but it doesn't want to do it. Could you tell me what I am missing to be able to
1. Update the table for the fields specified
2. Update key fields
...a) without changing in other table
...b) replacing keys in other table
Here is my view definition so far.
OPEN DATABASE wots
SELECT 0
USE wots!wohead
CREATE SQL VIEW vwoitems AS ;
SELECT Woitems.*, Contsub.prsched, Contsub.name, Prodserv.desc,;
Prodserv.unit, Prodserv.type, vlocations.descript as locdesc, vwo_istatus.descript as statusdesc;
FROM wots!woitems ;
LEFT JOIN wots!prodserv;
ON Woitems.prodserv = Prodserv.code ;
LEFT JOIN wots!contsub;
ON Woitems.contractor+ Woitems.contsub = Contsub.contractor+Contsub.subcode ;
LEFT JOIN wots!vlocations;
ON padr(Woitems.location,10) = vlocations.code ;
LEFT JOIN wots!vwo_istatus ;
ON Woitems.status = vwo_istatus.code ;
ORDER BY woitems.wo_id, woitems.wo_itemno ;
WHERE woitems.wo_id=wohead.wo_id
SELECT 0
USE wots!vwoitems
DBSETPROP("vWoitems.wo_id","FIELD","DEFAULTVALUE",'wohead.wo_id')
DBSETPROP("vWoitems.wo_id","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.wo_id","FIELD","KEYFIELD",.T.)
DBSETPROP("vWoitems.wo_itemno","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.wo_itemno","FIELD","KEYFIELD",.T.)
DBSETPROP("vWoitems.ex_ref","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.prodserv","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.location","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.contractor","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.contsub","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.baserate","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.contmargin","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.contmtype","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.custmargin","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.custmtype","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.status","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.qty","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.notes","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.price","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.origin","FIELD","UPDATABLE",.T.)
DBSETPROP("vWoitems.wo_id","FIELD","UPDATENAME","Woitems.wo_id")
DBSETPROP("vWoitems.wo_itemno","FIELD","UPDATENAME","Woitems.wo_itemno")
DBSETPROP("vWoitems.ex_ref","FIELD","UPDATENAME","Woitems.ex_ref")
DBSETPROP("vWoitems.prodserv","FIELD","UPDATENAME","Woitems.prodserv")
DBSETPROP("vWoitems.location","FIELD","UPDATENAME","Woitems.location")
DBSETPROP("vWoitems.contractor","FIELD","UPDATENAME","Woitems.contractor")
DBSETPROP("vWoitems.contsub","FIELD","UPDATENAME","Woitems.contsub")
DBSETPROP("vWoitems.baserate","FIELD","UPDATENAME","Woitems.baserate")
DBSETPROP("vWoitems.contmargin","FIELD","UPDATENAME","Woitems.contmargin")
DBSETPROP("vWoitems.contmtype","FIELD","UPDATENAME","Woitems.contmtype")
DBSETPROP("vWoitems.custmargin","FIELD","UPDATENAME","Woitems.custmargin")
DBSETPROP("vWoitems.custmtype","FIELD","UPDATENAME","Woitems.custmtype")
DBSETPROP("vWoitems.status","FIELD","UPDATENAME","Woitems.status")
DBSETPROP("vWoitems.qty","FIELD","UPDATENAME","Woitems.qty")
DBSETPROP("vWoitems.notes","FIELD","UPDATENAME","Woitems.notes")
DBSETPROP("vWoitems.price","FIELD","UPDATENAME","Woitems.price")
DBSETPROP("vWoitems.origin","FIELD","UPDATENAME","Woitems.origin")
DBSETPROP("vWoitems","VIEW","SENDUPDATES",.T.)
DBSETPROP("vWoitems","VIEW","TABLES","WOITEMS")
I find the help very confusing for this section. is there a better reference???
regards
Geoff Scott
May all your weeds be wildflowers