码迷,mamicode.com
首页 > 其他好文 > 详细

5.Firedac错误信息

时间:2015-02-24 13:47:03      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:

主要错误信息属性:

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;

5.Firedac错误信息

标签:

原文地址:http://www.cnblogs.com/carcode/p/4298627.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!