Board index » delphi » Delphi, Delphi, and Delphi

Delphi, Delphi, and Delphi

Is it possible for DELPHI to display meaningful "user-friendly"
error messages based on a look-up table, which is tied to the
ORACLE error messages ?
e.g. if the oracle message is "field cannot be null", can I trap
it to give an user-friendly message saying "Enter a value etc."?
If someone has worked on ORACLE*FORMS, he should understand what
I am trying to say?
Thanks
 

Re:Delphi, Delphi, and Delphi


Quote
Geeta (76563.3...@CompuServe.COM) wrote:

: Is it possible for DELPHI to display meaningful "user-friendly"
: error messages based on a look-up table, which is tied to the
: ORACLE error messages ?

Yep. You need to include your db operations in an EDBEngineError
and use the 'Native' field to extract the appropriate error code.
Matching that against a message table should be a trivial task.

--
Ebbe Jonsson, Systems Mangler                           e...@cardinal.fi
Tel: +358 53 553 53 97                                  e...@dbm.fi
Fax: +358 0 33 88 22                                    " Why me? "

Re:Delphi, Delphi, and Delphi


Quote
Geeta <76563.3...@CompuServe.COM> wrote:

=>Is it possible for DELPHI to display meaningful "user-friendly"
=>error messages based on a look-up table, which is tied to the
=>ORACLE error messages ?
=>e.g. if the oracle message is "field cannot be null", can I trap
=>it to give an user-friendly message saying "Enter a value etc."?
=>If someone has worked on ORACLE*FORMS, he should understand what
=>I am trying to say?
=>Thanks

You can change Delphi messages editing CONST.RES (and many others
Resource Objects) in delphi\lib directory. This will be more easy if
you have the Resource Workshop (TPW) or you can use the Image Editor
from Delphi's Tools main menu.

HTH,

Carlos Alberto

Other Threads