我在三层中,我添加一条记录后ApplyUpdata,这时保存成功,然后我马上对该记录修改,他就出错,ApplyUpData的返回值为1,
我在这里加入下列语句调试的时候,他就说Record not find
procedure TCDM_JS.CDS_hpsx_hpsxwhReconcileError(
DataSet: TCustomClientDataSet; E: EReconcileError;
UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
showmessage(e.Message);---〉这里就说 Record not find or use by another
end;
我在这里加入下列语句调试的时候,他就说Record not find
procedure TCDM_JS.CDS_hpsx_hpsxwhReconcileError(
DataSet: TCustomClientDataSet; E: EReconcileError;
UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
showmessage(e.Message);---〉这里就说 Record not find or use by another
end;
查看一下你提交ApplyUpdate后数据是不是已经提交到库里了,当ApplyUpdate后用一下ClientDataSet.MergeChangeLog一下,再进行修改,试试看。
最好不要用这个直接Insert 比这个好多了
最好不要用这个直接Insert 比这个好多了