200分求!急!急!Update Failed!(50分)

  • 主题发起人 toby_lee
  • 开始时间
T

toby_lee

Unregistered / Unconfirmed
GUEST, unregistred user!
各位:
我的开发环境:
Dephi 6.0 + MS SQL 7.0

Query 设为
cachedupdated:=true;
requstlive:=ture;
[:(!]
emp_updatesql中的modifysql中写到:
update employee
set
emp_id = :emp_id,
name = :name,
sex = :sex,
birthday = :birthday,
marrry = :marrry,
idcard = :idcard,
hiredate = :hiredate,
status = :status,
enddate = :enddate,
dep = :dep,
job = :job,
nativeplace = :nativeplace,
homeadd = :homeadd,
telephone = :telephone,
grdsch = :grdsch,
grddate = :grddate,
major = :major,
degree = :degree,
image = :image
where
emp_id = :OLD_emp_id and
name = :OLD_name and
sex = :OLD_sex and
birthday = :OLD_birthday and
marrry = :OLD_marrry and
idcard = :OLD_idcard and
hiredate = :OLD_hiredate and
status = :OLD_status and
enddate = :OLD_enddate and
dep = :OLD_dep and
job = :OLD_job and
nativeplace = :OLD_nativeplace and
homeadd = :OLD_homeadd and
telephone = :OLD_telephone and
grdsch = :OLD_grdsch and
grddate = :OLD_grddate and
major = :OLD_major and
degree = :OLD_degree and
image = :OLD_image


在Query的Onupdaterecord事件中写到
procedure Tdm_form.emp_queryUpdateRecord(DataSet: TDataSet;
UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction);
begin
emp_query.UpdateObject:=emp_updatesql;
emp_updatesql.SetParams(updatekind);
emp_updatesql.ExecSQL(updatekind);
updateaction:=uaapplied;

buttonclick中写到:
dm_form.emp_query.ApplyUpdates;

为什么在向后台提交时出错为:Update Failed。
 
query的updateobject接上没有啊?
 
emp_query.UpdateObject:=emp_updatesql;
接上了啊!如上句!是吗?
 
不行啊!
 
顶部