中间层用ado,客户端如何获得错误代码?不要说看李维的书,最好演示一下.(50分)

  • 主题发起人 主题发起人 zqnet
  • 开始时间 开始时间
Server:
procedure Tfrm****.DatasetSetProvider(Sender: TObject;
DataSet: TClientDataSet;
E: EUpdateError;
UpdateKind: TUpdateKind;
var Response: TResolverResponse);
begin
with Sender as TDataSetProviderdo
begin
if (ErrCat(E.ErrorCode) = ERRCAT_NOTFOUND) and
(UpdateMode <> upWhereKeyOnly) then
begin
UpdateMode := upWhereKeyOnly;
Response := rrApply;
end;
end;
end;

Client:
procedure Tfrmrkd.cdsrkdReconcileError(DataSet: TClientDataSet;
E: EReconcileError;
UpdateKind: TUpdateKind;
var Action: TReconcileAction);
//TUpdateKind = (ukModify, ukInsert, ukDelete);
//TReconcileAction = (raSkip, raAbort, raMerge, raCorrect, raCancel, raRefresh);
begin
Action := HandleReconcileError(DataSet, UpdateKind, E);
end;

ok?
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
后退
顶部