Print Thread
Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7440 05/13/05 01:57 PM
Joined: Sep 2000
Posts: 15
Milano, Italy
M
mclot Offline OP
Member
OP Offline
Member
M
Joined: Sep 2000
Posts: 15
Milano, Italy
D7 and DOA 4.0.6.2

I'm sorry but this problem still occurs to me.

with the following SQL statement:

select numField
from Tbl1
union
select numField
from Tbl2

and using the 'numField' TField created in the OracleDataSet, I get the error message in the subject.

Neither "event 10499" works in Oracle 9.2!
More, in Oracle 10g "event 10499" is no more supported!!
The only way is to delete the TField and access the 'numField' field via FieldByName method.

In a past message you said that in DOA 4.0.6.2 this problem should have been fixed.
Maybe the problem raises because of the "select union" statement? Anyway with Oracle versions before 9.2.0.5 this error never occured.

Any idea?
Thanks a lot.

Massimo

Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7441 05/13/05 08:01 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
If 10g reports this field as an integer field, then I think you will need to recreate the field as an integer field in Delphi.


Marco Kalter
Allround Automations
Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7442 05/16/05 03:10 PM
Joined: Sep 2000
Posts: 15
Milano, Italy
M
mclot Offline OP
Member
OP Offline
Member
M
Joined: Sep 2000
Posts: 15
Milano, Italy
The problem is that if my application runs (as it actually does) on Oracle 8.1.7 up to Oracle 9.2.0.4 I get a TFloat field while if it runs on Oracle 9.2.0.5 up to Oracle 10g I get a TInteger field. And as my application was born with Oracle 8.1.7 (thus TFields are TFloat fields), migrating some installations (obviously with the same program sources) to Oracle 9.2.0.5 or above raises the described exception.
To solve my problem I should create TFields at runtime or access them by FieldByName method (as I'm already doing with my new program sources).
Considering my application is quite huge, to change all existing sources is a little bit 'not to be proposed'.

That's why I was wondering you had a workaround.

Massimo

Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7443 05/16/05 07:39 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
I'm afraid I don't have a workaround. It can be quite troublesome when field properties change between Oracle versions, that affect TField properties that are not allowed to change.


Marco Kalter
Allround Automations
Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7444 05/17/05 04:47 PM
Joined: Sep 2000
Posts: 15
Milano, Italy
M
mclot Offline OP
Member
OP Offline
Member
M
Joined: Sep 2000
Posts: 15
Milano, Italy
Never mind.
Thank you anyway for your reply.

Massimo

Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7445 05/28/05 11:27 PM
Joined: May 2005
Posts: 30
Member
Offline
Member
Joined: May 2005
Posts: 30
Hi - just to add my toughts: I have the same problems. What I'm doing is multiply the field by 1.0 to force it to a floatfield, in any version. Not much elegant, but since I have this problem only on reports, was an easy way to solve it.

Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7446 07/22/05 03:37 PM
Joined: Aug 2004
Posts: 83
Ukraine
A
Member
Offline
Member
A
Joined: Aug 2004
Posts: 83
Ukraine
In this case, Can DOA reads information about already exists fields and uses this information?
(TOracleQuery.InternalDescribe ?)
We can't quickly change all query's in our projects.
WBR, AndreyMx

Re: Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
#7447 07/22/05 06:29 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
The problem is that Borland's TFieldDef class requires that the database field type and persistent field types are the same. This is where the exception comes from.


Marco Kalter
Allround Automations

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.029s Queries: 14 (0.007s) Memory: 2.5292 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-09 13:20:46 UTC
Valid HTML 5 and Valid CSS