读书人

怎么把更新本地VF表后SQL上的表也随时

发布时间: 2012-02-02 23:57:14 作者: rapoo

如何把更新本地VF表后SQL上的表也随时更新呢?
nhandle=sqlstringconnect( "driver=sql server;.............. ")
if nhandle> 0

cc=2
sqlexec(nhandle, "select id,name from db1 ", "gh ")
select gh


=sqlexec(nhandle, "select * from db1 ", "gh ")
=cursorsetprop( "Buffering ",5, "gh ")
=cursorsetprop( "Tables ", "db1 ", "gh ")
=cursorsetprop( "keyfieldlist ", 'id ', "gh ")
=cursorsetprop( "UpdatableFieldList ", "name ", "gh ")
=cursorsetprop( "UpdateNameList ", "name gh.name ", "gh ")
=cursorsetprop( "SendUpdates ",.T., "gh ")
replace name with "7.2 "
=TableUpdate(.F.
append blank
replace name with "7.2 "
=tableupdate(.T.
brows
else
messagebox( "数据库没打开 ",48, "系统提示 ")
endif

本地表是更新了;但是SQL上没更新呢~

谁能帮助我?

[解决办法]
请参考:

http://www.gz9f.com/jiaocai/hcc/hcc9/hcc9.htm

读书人网 >VFP

热点推荐