Subject Re: [firebird-support] SQL Error
Author Helen Borrie
At 08:24 AM 11/11/2003 +0200, you wrote:
>I have the following problem. I am trying to convert my BDE application to
>a firebird application.

"That does not compute". The BDE is not a DBMS and Firebird is not an
application platform.

Do you mean you are converting your database from Paradox to Firebird?

>So I created equal tables on the firebird side. I
>then send record for record over which then throws an error on the 182'th
>record. The recors is still inserted but it still pops the following error
>message :
>"
>'The SQL : INSERT INTO COUNTRY (Field1,Field2,Field3,Field4,Field5,Field6)
>VALUES(?,?,?,?,?,?) ; SQL Error : Arithmetic exception , numeric overflow
>or string truncation. Error Code: -802. Arithmetic overflow or division by
>zero has occured.'
>"
>
>Now I tried changing the connection protocol , deleting that specific
>record , my fields are all VARCHAR except for the primary key which is an
>integer. All the VARCHAR fields are either the same size or bigger. The BDE
>table contains no row where all the fields are NULL. Even if I run up to
>the 182'th record just before the insert and inspect the fields sent
>through they all contain values and it always throws the exception on the
>182'th record. Does anybody have more of a clue what is going on.

I suspect that you recreated your Paradox indexes or keys in the new
Firebird tables, and that you are getting string overflows during the
creation of index nodes. Is this the case?

A Firebird index has quite a low size limit - at most, 253 bytes. If you
have composite indexes, the limit gets smaller. If you are not using US
ASCII character set, the limit shrinks further. If there is a non-binary
collation sequence on any of those columns, the limit could be as small as
about 80 bytes.

heLen