Board index » delphi » Need to translate BDE Error messages (key Violation)

Need to translate BDE Error messages (key Violation)

Hi there i need to translate BDE error messages like Key Violation or 'Null
Values'
how can i do this ?
 

Re:Need to translate BDE Error messages (key Violation)


Quote
"Damian Cabrera" <damian...@yahoo.com> wrote:
>Hi there i need to translate BDE error messages like Key Violation or 'Null
>Values'
>how can i do this ?

Damian,

Does this help?

var
   ErrCode: word;
begin
   if (E is EDBEngineError) then  
       begin
       ErrCode := (E as EDBEngineError).Errors[0].ErrorCode;
       if ErrCode = DBIERR_FORIEGNKEYERR then
       {do something}
        end;
end;

You can get a complete list of errors in the file called BDE.INT in
the DOC directory of your Delphi installation. You can also see some
of this code in action in the installation directory called
Demos/DB/DBErrors.

Good luck.

Phil Cain
--

Other Threads