Print Thread
Page 2 of 2 1 2
Re: integer columns
#7619 11/21/05 03:41 PM
Joined: Mar 2003
Posts: 5
Ponta Grossa - PR - Brazil
K
Member
Offline
Member
K
Joined: Mar 2003
Posts: 5
Ponta Grossa - PR - Brazil
I have the same problem presented here when migrating to Oracle10. I get "Type mismatch <..> expecting Float, actual Integer" error message.

But Oracle reported at Note:241355.1 on metalink.oracle.com a similar problem.

I am referring to this following issue (taken from metalink):
"Bug 2235818 was backported to 9.2.0.3 and corrected the way in which columns that are of NUMBER type, but have no explicit scale specified, internally represent the scale (we return -127 instead of 0 now).
Unfortunately, lots of legacy code INCORRECTLY used a test on the scale and if it was -127 they assumed that the datatype was a FLOAT. The legacy code should have checked for a non-zero precision and a scale of -127 to detect a genuine FLOAT type.
As 9.2.0.3 is a patch set release it has been decided to offer event 10499 as a method to revert to the OLD behaviour. The OLD behaviour is enabled by using the event with any non-zero level.
N.B. The event is NOT available in 10i and so client applications that require the use of the event will need to be rewritten before they are moved to 10i."

Re: integer columns
#7620 11/21/05 10:45 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
That is not the same problem. This particular compatibility issue was addressed in 4.0.4.


Marco Kalter
Allround Automations
Re: integer columns
#7621 11/30/05 12:43 AM
Joined: Apr 2004
Posts: 8
San Antonio, TX
H
Member
Offline
Member
H
Joined: Apr 2004
Posts: 8
San Antonio, TX
I have been having the same issue and found one way to work around the problem (in reports at least). I changed the SQL in the TOracleDataSet component so that I cast the offending column into the correct datatype. After changing the SQL I deleted the field from the Fields collection and then added it back in. The format for the Cast I used is as follows:

Select CAST(quarter as integer) quarter,
fiscal_year_execution,
...
from myTable
Where blah blah blah

You can use float instead of integer or any other datatype (such as varchar2(x)).

Hope this helps

Rick Anderson

Re: integer columns
#7622 09/04/06 03:04 PM
Joined: Nov 2001
Posts: 14
Cenon, France
L
Member
Offline
Member
L
Joined: Nov 2001
Posts: 14
Cenon, France
Hi all,
we've just encountered the same issue here...
We'd like to know if anyone has found a solution ?

We tried 2 solutions :
1 - setting TOracleSession.Preferences.IntegerPrecision to 10
=> ok with Oracle 9.2.0.7.......BUT NOT OK with oracle 9.2.0.1.
The pb is that our customers have different oracle versions...and our product must work in both 9.2.0.1 and in 9.2.0.7 oracle version...

2 - we tried to CAST as integer
=> good solution.........but only if you have less than 10 queries to modify.
In our product, it is not possible because we have thousands of queries...and we don't have much time to do such a correction...

Is there a new solution ?

Thanks in advance,
Laurent.

Page 2 of 2 1 2

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.236s Queries: 15 (0.088s) Memory: 2.5314 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-05 20:42:55 UTC
Valid HTML 5 and Valid CSS