#2
csyx2024-06-02 21:32
|
程序代码:
CREATE CURSOR t(bh i)
INSERT INTO t (bh) values(207) &&本地临时表
con = Sqlstringconnect([Driver={SQL Server};Server=PC-20221207NOOB;UID=sa;PWD=wjh-6552907;Database=yksb])
Public ca
ca=Createobject("CursorAdapter")
With ca
.Alias = 'cs3' &&别名
.Datasource=con &&建立的连接
.DataSourceType = 'odbc'
.SelectCmd = "select * from shebei_zl_cs where id in (select bh from t)" &&sele 语句
.KeyFieldList = 'id' &&关键字
.Tables = "cs3" &&要修改的表
.UpdatableFieldList = "id,id_zl" &&修改的字段
.UpdateNameList ="id cs3.id,id_zl cs3.id_zl" &&对应修改表的字段 这里必须包含关键字
.CursorFill() &&
Endwith
Select cs3 &&程序运行到这里出错
CursorSetProp("buffering",3)
browse
INSERT INTO t (bh) values(207) &&本地临时表
con = Sqlstringconnect([Driver={SQL Server};Server=PC-20221207NOOB;UID=sa;PWD=wjh-6552907;Database=yksb])
Public ca
ca=Createobject("CursorAdapter")
With ca
.Alias = 'cs3' &&别名
.Datasource=con &&建立的连接
.DataSourceType = 'odbc'
.SelectCmd = "select * from shebei_zl_cs where id in (select bh from t)" &&sele 语句
.KeyFieldList = 'id' &&关键字
.Tables = "cs3" &&要修改的表
.UpdatableFieldList = "id,id_zl" &&修改的字段
.UpdateNameList ="id cs3.id,id_zl cs3.id_zl" &&对应修改表的字段 这里必须包含关键字
.CursorFill() &&
Endwith
Select cs3 &&程序运行到这里出错
CursorSetProp("buffering",3)
browse
[此贴子已经被作者于2024-6-2 19:17编辑过]