在TDataSetProvider的OnUpdateError里面
var
sDBError : EDBEngineError;
iCpunt : Integer;
begin
frmErrorServer.edit1.text := IntToStr(E.Errorcode);
frmErrorServer.edit2.text := E.Context;
if (E.Errorcode <> 0) then
if (E.OriginalException is EDBEngineError) then
begin
eDBError := E.OriginalException as EDBEngineError;
ShowMessage(IntToStr(sDBError.ErrorCount));
for iCount := 0 to eDBError.ErrorCount -1 do
begin
frmErrorServer.Listbox1.Items.Add(IntToStr(eDBError.Errors[iCount].NativeError));//这样就能得到原生错误码了,你根据这个自定义错误消息
end;
end;
end;
var
sDBError : EDBEngineError;
iCpunt : Integer;
begin
frmErrorServer.edit1.text := IntToStr(E.Errorcode);
frmErrorServer.edit2.text := E.Context;
if (E.Errorcode <> 0) then
if (E.OriginalException is EDBEngineError) then
begin
eDBError := E.OriginalException as EDBEngineError;
ShowMessage(IntToStr(sDBError.ErrorCount));
for iCount := 0 to eDBError.ErrorCount -1 do
begin
frmErrorServer.Listbox1.Items.Add(IntToStr(eDBError.Errors[iCount].NativeError));//这样就能得到原生错误码了,你根据这个自定义错误消息
end;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货