是这样
ca=Createobject("CursorAdapter")
With ca
.Alias = 'cs'
.Datasource=con
.DataSourceType = 'odbc'
.SelectCmd = "select * from cs "
.KeyFieldList = 'id'
.Tables = "cs"
.UpdatableFieldList = "id,姓名,性别"
.UpdateNameList ="id cs.id,姓名 cs.姓名,性别 cs.性别"
.CursorFill()
ENDWITH
Select cs
CursorSetProp("buffering",3)
修改数据,没有保存,测试,关掉数据sql server,然后关闭程序
ca=Createobject("CursorAdapter")
With ca
.Alias = 'cs'
.Datasource=con
.DataSourceType = 'odbc'
.SelectCmd = "select * from cs "
.KeyFieldList = 'id'
.Tables = "cs"
.UpdatableFieldList = "id,姓名,性别"
.UpdateNameList ="id cs.id,姓名 cs.姓名,性别 cs.性别"
.CursorFill()
ENDWITH
Select cs
CursorSetProp("buffering",3)
修改数据,没有保存,测试,关掉数据sql server,然后关闭程序