Subject Re: [firebird-support] Help: "ISC ERROR CODE: 335544321"
Author Helen Borrie
At 02:45 PM 20/11/2008, you wrote:

>Hi,
>
>I have received the error message when I ran my delphi application on
>firebird V1.5.1.
>
>The message is "ISC ERROR CODE: 335544321 . ISC ERROR MESSAGE:
>arithmetic exception, numeric overflow, or string truncation.
>STATEMENT:TIBOInternalDataset:<TApplication>.sform.testsql.IBOqrtestsql"\
>.

The solution for this error is not to write code that can cause arithmetic exceptions, numeric overflows or string truncations.

If you see this error in the company of "Cannot transliterate between character sets" then the error involves strings and character sets in one of several ways.

An arithmetic exception occurs when you try to perform an arithmetic operation on something that is not a number. (Divide-by-zero would give you an additional message). A common source of this error for Delphi programmers is trying to use the '+' operator to concatenate strings in an SQL statement. The SQL concatenator operator is '||', sometimes called 'double-pipe'.

Numeric overflow happens when you try to plug a value into a numeric column that is "larger" (in scale and/or precision) than the data type defined for the column...like trying to update a numeric(9,2) column with the result of a multiplication or division involving two numeric(9,2) values without recasting it. Amongst other things....

String truncation errors are like numeric overflows, except that here you are pushing more bytes into a text column than the maximum number of bytes defined for the column. Concatenations can make this happen; so can trying to push multi-byte strings into char(n) or varchar(n) columns that were defined with a single-byte character set in mind.

You have a haystack here with a lost needle in it. You have to find that needle.

./heLen