为什么VFP操作access表可每次运行只有80条记录被同步更新,请大虾帮忙看看
nhandle=SQLSTRINGCONNECT("Driver={Microsoft Access Driver (*.mdb)};dbq=D:\dzyh\acc\acc_db\dzyh.mdb;") IF nhandle<=0
MESSAGEBOX("数据库连接失败!!!",16, '错误信息')
RETURN
ELSE
set multilocks on
iret=sqlexec(nhandle,"select id_n,行号,客户号,名称 from zh_zftjyb where 行号=3104","bmb")
IF iret < 0
MESSAGEBOX("读取数据错误!",16, '错误信息')
=SQLDisconnect(nhandle)
RETURN
ENDIF
SELECT bmb
UPDATE bmb SET 行号 = 9999 where 行号=3104
cursorsetprop("tables","zh_zftjyb","bmb")
cursorsetprop("keyfieldlist","客户号","bmb")
cursorsetprop("updatablefieldlist","行号,客户号,名称","bmb")
cursorsetprop("updatenamelist","行号 zh_zftjyb.行号,客户号 zh_zftjyb.客户号,名称 zh_zftjyb.名称","bmb")
cursorsetprop("sendupdates",.t.,"bmb")
cursorsetprop("wheretype",2,"bmb")
cursorsetprop("buffering",5,"bmb")
CURSORSETPROP('UPDATETYPE',1)
CURSORSETPROP('FETCHSIZE',-1)
CURSORSETPROP('BATCHUPDATECOUNT'2000) &&设置的是2000
tableupdate(1,.t.,"bmb")
BROWSE
ENDIF
=SQLDisconnect(nhandle)
use
close database
retu