Print Thread
integer seen as float
#1978 05/01/01 11:37 PM
Joined: Mar 2000
Posts: 37
Napa, CA, USA
J
jimpoe Offline OP
Member
OP Offline
Member
J
Joined: Mar 2000
Posts: 37
Napa, CA, USA
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


Jim Poe
Re: integer seen as float
#1979 05/02/01 12:55 AM
Joined: Sep 2000
Posts: 23
fairfax, va, us
L
Member
Offline
Member
L
Joined: Sep 2000
Posts: 23
fairfax, va, us
make sure your oracledataset's variables property for :CARR_ID is selected integer.....

Re: integer seen as float
#1980 05/02/01 01:00 AM
Joined: Mar 2000
Posts: 37
Napa, CA, USA
J
jimpoe Offline OP
Member
OP Offline
Member
J
Joined: Mar 2000
Posts: 37
Napa, CA, USA
I did as noted in my original message. ":CARR_ID is defined as an integer."

Thanks


Jim Poe
Re: integer seen as float
#1981 05/03/01 02:13 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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


Marco Kalter
Allround Automations
Re: integer seen as float
#1982 05/03/01 08:17 PM
Joined: Mar 2000
Posts: 37
Napa, CA, USA
J
jimpoe Offline OP
Member
OP Offline
Member
J
Joined: Mar 2000
Posts: 37
Napa, CA, USA
Thanks for the info. At least I know what to expect now.

Jim


Jim Poe

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.129s Queries: 12 (0.057s) Memory: 2.5153 MB (Peak: 3.0428 MB) Data Comp: Off Server Time: 2024-05-18 05:41:20 UTC
Valid HTML 5 and Valid CSS