求教:关于多表视图更新原数据表的问题
vfp9.0中,使用create sql view 创建一个多表视图,当修改数据后移动到下一个记录时,提示“未指定要更新表,请使用临时表的Tables属性”的错误,无法实现原表数据的更新。因为表数据是按月动态的,所以我对数据表名使用了宏替换。具体语句如下:fkq='kq_'+tmp_year+tmp_month
fjj='jj_'+tmp_year+tmp_month
cbmdm=SUBSTR(ALLTRIM(thisform.treeview1.selectedItem.Text),1,5)
CREATE SQL VIEW kq_jj as select kq.gh,kq.name,kq.bmdm,kq.ycq,kq.scq,kq.dlts,jj.ccjj,jj.zljp,jj.gwjt,jj.gh gh1 from &fkq kq left join &fjj jj on kq.gh=jj.gh order by kq.bmdm,kq.gh where kq.bmdm=cbmdm
DBSETPROP("kq_jj","view","SendUpdates",.T.)
DBSETPROP("kq_jj","view","BatchUpdateCount",1)
DBSETPROP("kq_jj","view","CompareMemo",.T.)
DBSETPROP("kq_jj","VIEW","FetchAsNeeded",.F.)
DBSETPROP("kq_jj","VIEW","FetchMemo",.T.)
DBSETPROP("kq_jj","VIEW","FetchSize",100)
DBSETPROP("kq_jj","VIEW","MaxRecords",-1)
DBSETPROP("kq_jj","VIEW","Prepared",.F.)
DBSETPROP("kq_jj","VIEW","UpdateType",1)
DBSETPROP("kq_jj","VIEW","UseMemoSize",255)
DBSETPROP("kq_jj","VIEW","Tables","&fkq,&fjj")
DBSETPROP("kq_jj","VIEW","WhereType",3)
DBSETPROP("kq_jj.gh","FIELD","DataType","c(8)")
DBSETPROP("kq_jj.gh","FIELD","UpdateName","&fkq.gh")
DBSETPROP("kq_jj.gh","FIELD","KeyField",.T.)
DBSETPROP("kq_jj.gh","FIELD","Updatable",.F.)
DBSETPROP("kq_jj.gh1","FIELD","DataType","c(8)")
DBSETPROP("kq_jj.gh1","FIELD","UpdateName","&fjj.gh")
DBSETPROP("kq_jj.gh1","FIELD","KeyField",.T.)
DBSETPROP("kq_jj.gh1","FIELD","Updatable",.F.)
DBSetProp("kq_jj.name","Field","DataType","C(6)")
DBSetProp("kq_jj.name","Field","UpdateName","&fkq.name")
DBSetProp("kq_jj.name","Field","KeyField",.F.)
DBSetProp("kq_jj.name","Field","Updatable",.T.)
DBSetProp("kq_jj.bmdm","Field","DataType","C(5)")
DBSetProp("kq_jj.bmdm","Field","UpdateName","&fkq.bmdm")
DBSetProp("kq_jj.bmdm","Field","KeyField",.F.)
DBSetProp("kq_jj.bmdm","Field","Updatable",.T.)
DBSetProp("kq_jj.ycq","Field","DataType","N(4,1)")
DBSetProp("kq_jj.ycq","Field","UpdateName","&fkq.ycq")
DBSetProp("kq_jj.ycq","Field","KeyField",.F.)
DBSetProp("kq_jj.ycq","Field","Updatable",.T.)
DBSetProp("kq_jj.scq","Field","DataType","N(4,1)")
DBSetProp("kq_jj.scq","Field","UpdateName","&fkq.scq")
DBSetProp("kq_jj.scq","Field","KeyField",.F.)
DBSetProp("kq_jj.scq","Field","Updatable",.T.)
DBSetProp("kq_jj.dlts","Field","DataType","N(4,1)")
DBSetProp("kq_jj.dlts","Field","UpdateName","&fkq.dlts")
DBSetProp("kq_jj.dlts","Field","KeyField",.F.)
DBSetProp("kq_jj.dlts","Field","Updatable",.T.)
DBSetProp("kq_jj.ccjj","Field","DataType","N(12,2)")
DBSetProp("kq_jj.ccjj","Field","UpdateName","&fjj.ccjj")
DBSetProp("kq_jj.ccjj","Field","KeyField",.F.)
DBSetProp("kq_jj.ccjj","Field","Updatable",.T.)
DBSetProp("kq_jj.zljp","Field","DataType","N(8,2)")
DBSetProp("kq_jj.zljp","Field","UpdateName","&fjj.zljp")
DBSetProp("kq_jj.zljp","Field","KeyField",.F.)
DBSetProp("kq_jj.zljp","Field","Updatable",.T.)
DBSetProp("kq_jj.gwjt","Field","DataType","N(8,2)")
DBSetProp("kq_jj.gwjt","Field","UpdateName","&fjj.gwjt")
DBSetProp("kq_jj.gwjt","Field","KeyField",.F.)
DBSetProp("kq_jj.gwjt","Field","Updatable",.T.)