Subject Re: [ib-support] Error when restoring
Author Ann W. Harrison
At 09:59 AM 10/14/2002 +0200, Gerhardus Geldenhuis wrote:


>I get the following error when restoring a database
>
>gbak: restoring index RDB$PRIMARY11
>ERROR: arithmetic exception, numeric overflow, or string truncation

The TIMEPERDEPARTMENT table has (at least) a record with a value
in (at least one) primary key field that is longer or larger than
the field allows. Gbak performs >no< validity checking when doing
a backup, so a database with junk in it produces backups that can't
be restored.


>I deleted all the data from the table which seemed to do the trick.

As one would expect

> would it be possible to get a more
>descriptive error message as to what went wrong.

The error:
arithmetic exception, numeric overflow, or string truncation
has been a favorite of InterBase and now Firebird users for
a decade and a half. It is generated deep enough in the engine
that there is no context to build a better message. It may
be possible to catch the error in higher layers and add context.
To date, everyone who's looked at the problem has found better
use for her time.


Regards,

Ann
www.ibphoenix.com
We have answers.