Главная страница | назад





Article #22696: Error: "Type mismatch"

QUESTION:

Why am I getting type mismatch error when I try to query my oracle table?

ANSWER:

The numeric type that oracle uses allows a length field and a precision field. So declaring a field to be Numeric (10,4) specifies a number with 10 digits, 4 of which to be used for precision.

Declaration | Valid input
----------------------------
Numeric (5,2) | 345.23
Numeric(3) | 345 *
*Note: This Declaration appears to be an integer but is actually a floating-point number.

In both cases these numbers are stored as floating point Numbers. If your tables have type TIntegerField where a numeric field was declared, then you will get an error on activation. Technically the BDE handles Numeric fields as floats, even if they look like integers. If you are sure that the values in table are integers then you can use the Trunc function, which returns an Int64.

Last Modified: 14-AUG-00