|
Tblxxx: type mismatch for field 'yyy'; expecting float, actual integer
|
Joined: Sep 2000
Posts: 15 Milano, Italy
Member
|
OP
Member
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
|
Joined: Aug 1999
Posts: 22,212
Member
|
Member
Joined: Aug 1999
Posts: 22,212 |
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
|
Joined: Sep 2000
Posts: 15 Milano, Italy
Member
|
OP
Member
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
|
Joined: Aug 1999
Posts: 22,212
Member
|
Member
Joined: Aug 1999
Posts: 22,212 |
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
|
Joined: Sep 2000
Posts: 15 Milano, Italy
Member
|
OP
Member
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
|
Joined: May 2005
Posts: 30
Member
|
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
|
Joined: Aug 2004
Posts: 83 Ukraine
Member
|
Member
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
|
Joined: Aug 1999
Posts: 22,212
Member
|
Member
Joined: Aug 1999
Posts: 22,212 |
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
|
|
|
|
|
|