Subject Re: [firebird-support] insert/update/delete - conversion error from string ??
Author Helen Borrie
At 01:35 AM 4/08/2005 +0200, Andi Voss wrote:
>Hi,
>
>I´ve a problem to insert/update or delete data to/from only one specific
>table.
>Everytime I get the error:
>"conversion error from string "" "
>but the SQL-Querys are 100% correct. Heres a very simple one (insert
>into preise (artikelnr,preislst) values ('andi02','2') ). This one
>doesn't work. The same to update and delete. In every other table it is
>possible to change the data in it.
>
>The strange thing is, a copy of this db is running on another host (same
>FirebirdSS-1.0.0.796-0, same OS Slackware 8.1 Kernel 2.4.26 ) and
>everything works fine in the specific table.
>It does not matter from which programm the SQL-Query is set. isql,
>ibwebadmin, ibexpert - everytime the same error. IBExpert show this
>additional info:
>"Overflow occured during datatype conversion
>conversion error from string "" "
>
>Another DB with the same structure but different data is running on the
>same host and everything is fine when the SQL-Query from above is set.
>I reinstalled the Firebird-Server. Shutting down etc. nothing was
>successful.
>
>What/where could be the problem?

The problem may be that artikelnr is not defined as a string type (CHAR or
VARCHAR) but as some other type. The engine tries to convert the string
'andi02' to the defined type and fails.

Alternatively, if you have a trigger on that table, that creates a primary
key from a generator, check to ensure that the definition for the primary
key is large enough to accommodate the current value of the generator. For
example, if it is defined as SMALLINT, any generator number higher than
32,767 will cause an overflow. Thus, the fact that the same database at
other sites do not exhibit this error indicates that those databases are
still generating numbers within the range of SMALLINT.

>Need more info?

Perform a metadata extract on *that* version of the database and find out
whether the definitions for this table are consistent with the data that
you are trying to store. Look at triggers, computed-by columns and check
constraints. If you are still bemused, post the actual definitions and an
actual failing query, with all of the exceptions you are getting, in
correct chronological order.

./heLen