感谢楼上,请现场指导,拜谢
c_pzwhfiellist=""
c_pzwhbglist=""
For i=1 To Fcount()-1
c_pzwhfiellist=c_pzwhfiellist+Field(i)+","
c_pzwhbglist=c_pzwhbglist+Field(i)+Space(1)+"pzwhk."+Field(i)+","+Chr(10)
Endfor
c_pzwhfiellist=c_pzwhfiellist+Field(Fcount())
c_pzwhbglist=c_pzwhbglist+Field(Fcount())+Space(1)+"pzwhk."+Field(Fcount())
CursorSetProp("tables","pzwhk","pzwh_k") &&设置临时表的更新目标表
CursorSetProp("keyfieldlist","xh","pzwh_k") &&设置临时表的关键字
CursorSetProp("UpdateType",1,"pzwh_k") &&设置用新数据更新旧数据
CursorSetProp("updatablefieldlist",c_pzwhfiellist,"pzwh_k") &&设置临时表的更新字段
CursorSetProp("updatenamelist",c_pzwhbglist,"pzwh_k") &&&用cyjp_gk中的相应字段更新cyjpgk表
CursorSetProp("sendupdates",.T.,"pzwh_k")
CURSORSETPROP("WhereType",1,"pzwh_k") &&更新SQL语句中where子句包含主关键字与被修改过的字段
CursorSetProp("Buffering",3, "pzwh_k") &&设置表缓冲
CursorSetProp("BatchUpdateCount",50,"pzwh_k") &&发送到缓冲表的远程数据源的更新指令的数目
CURSORSETPROP("CompareMemo",.t.,"pzwh_k")
CURSORSETPROP("FetchMemo",.t.,"pzwh_k")
Tableupdate(.T.,.T.,'pzwh_k')