Subject Re: [firebird-support] FB1.5 Field Type Question
Author Ann W. Harrison
Hans wrote:
> variable total integer
>
> Using Dialect 1 .. select sum(total) as total -> Rave reports comes thru as
> a dtInteger, as expected.
>
> Using Dialect 3.. select sum(total) as total -> Rave reports fails on
> 'expected fieldtype dtInteger but found dtInt64
>

Dialect 3 introduced BigInt - or variants - to handle binary values with
a precision of more than 9 digits. The sum of a group of ints will, by
default, be expressed as a BigInt because adding a group of numbers with
values < 9 digits could easily result in a total that is > 9 digits. By
casting the result back to an int, you run the risk of truncation, but
avoid an error from the calling program.


Regards,


Ann