标签:
主要错误信息属性:
1.EFDDBEngineException
2. TFDDBError属性:
处理OnError过程:
procedure TForm1.FDConnection1Error(ASender: TObject; const AInitiator: IFDStanObject;
var AException: Exception);
var
oExc: EFDDBEngineException;
begin
if AException is EFDDBEngineException then begin
oExc := EFDDBEngineException(AException);
if oExc.Kind = ekRecordLocked then
oExc.Message := ‘Please, try the operation later. At moment, the record is busy‘
else if (oExc.Kind = ekUKViolated) and SameText(oExc[0].ObjName, ‘UniqueKey_Orders‘) then
oExc.Message := ‘Please, provide the unique order information. It seems, your order was already put‘;
end;
end;
FDConnection1.OnError := FDConnection1Error;
标签:
原文地址:http://www.cnblogs.com/carcode/p/4298627.html