upWhereAll :All columns (fields) are used to locate the record.(使用所有的字段来定位需要修改的记录)
upWhereChanged:Only key field values and the original value of fields that have changed are used to find the record.
(只使用关键字和被修改的字段原来的数据来定位需要修改的记录。)
upWhereKeyOnly:Only key fields are used to find the record.
(只使用关键字来定位需要修改的记录。)
这和delphi将数据更新回数据库时生成的Sql语句有关。比如有一个表
a(
aaa char(10),
bbb char(10),
ccc char(10)
primary key (aaa)
)
如果UpdateMode=upWhereAll
则修改数据时Delphi生成的语句大概是
update a set aaa=something ,bbb=something,ccc=something
where aaa=:1 and bbb=:2 and ccc=:3
如果UpdateMode=upWhereChanged,用户修改了bbb
则修改数据时Delphi生成的语句大概是
updata a set bbb=something
where aaa=:1 and bbb=:2
如果UpdateMode=upWhereKeyOnly,用户修改了bbb
则修改数据时Delphi生成的语句大概是
updata a set bbb=something
where aaa=:1