S
sns
Unregistered / Unconfirmed
GUEST, unregistred user!
string1:=' UPDATE UDeposit SET CloseDate =:workdate where pendate<=:workdate ' ; with Qry1 do begin close; sql.Clear; sql.Add(string1) ; parameters.ParamByName('workdate').Value:=workdate; execsql; end; 执行结果不正确,数据库更新的字段无变化将变量改为两个,结果正确string1:=' UPDATE UDeposit SET CloseDate =:workdate1 where endate<=:workdate ' ; with Qry1 do begin close; sql.Clear; sql.Add(string1) ; parameters.ParamByName('workdate1').Value:=workdate; parameters.ParamByName('workdate').Value:=workdate; execsql; end;