Subject | Re: [ib-support] Errors. Messages |
---|---|
Author | Martijn Tonies |
Post date | 2002-07-29T09:23:27Z |
Hi Michael,
There is an error-code inside the message.
Besides that, I always name my constraints myself, for example,
FK_BESTEL_ARTIKEL would be a FK from table BESTEL
to table ARTIKEL and then I can check the error-message-string
for that so I can display a decent message.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
There is an error-code inside the message.
Besides that, I always name my constraints myself, for example,
FK_BESTEL_ARTIKEL would be a FK from table BESTEL
to table ARTIKEL and then I can check the error-message-string
for that so I can display a decent message.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> I use Firebird version 1.0.
> I once in a while get a error from the DB.
> Sometimes this error is because I try to delete a record which is
> being referenced.
> I do this in a TRY - EXCEPT part in my D5.
>
> I then show a form, which I have made myself, where I show the
>
> on E: Exception do begin
> CallError('Some Message ',E.Message);
> end;
>
> But is it not posible to trap some of the message and handle them
> myself ?
>
> Example:
> I have made a program years ago in TP7 to MS-DOS.
> In here I used a file system access which ALWAYS returned an
> errorcode.
> If it was 0 everything went OK, every other value ment something.
> I.e. the value of 5 was Key-Error.
>
> I could then show an apropriate message which my customers could
> understand instead of "Key violation on......" which was nonsense to
> my customer.
>
> Is ot not posible to do the same i D5 when using Firebird ?