integer seen as float

jimpoe

Member²
I have this sql in an OracleDataSet - SELECT Trunc( :CARR_ID ) CARR_ID, ST.ST_ID
FROM ST, DUAL

:CARR_ID is defined as an integer. In the fields editor, CARR_ID is defined as an integer. When I activate the query using MIDAS, I get this error 'dstAUTH_ST: Type mismatch for field 'CARR_ID', expecting: Integer actual: Float'.

How can I get rid of this error message?

Thanks
 
The integer variable in the select list is reported by oracle without scale and precision, and is therefore treated as a float by the dataset. I don't think there is any SQL function you can use to change this behavior.

The only way to change this field to a TIntegerField is by setting TOracleSession.Preferences.IntegerPrecision to 38 (the maximum number precision). Now all fields that have a 0 scale will be treated as an integer, at the risk that the values are too large (32 bits, 9 digits maximum). There may also be side effects for other dataset fields linked to this session.

------------------
Marco Kalter
Allround Automations
 
Back
Top