Data Maping Expecting: Integer, Actual: Float

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
LeoPrates
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Data Maping Expecting: Integer, Actual: Float

Post by LeoPrates » Fri 23 Dec 2016 10:53

Using Oracle 11g Release 2.
In an sql I have Number (10) and Number (5) fields.
In the ClientDataSet both are as TIntegerField, but when opening the search shows "Type mismatch for field 'FIELD', expecting: Integer actual: Float".

The problem is in the Number (5) field. The Number (10) field works fine as TIntegerField.


with SQLConnection1 do
begin
Connected := False;
DriverName := 'DevartOracle';
GetDriverFunc := 'getSQLDriverORA';
Params.Values['DataBase'] := 'database';
Params.Values['User_Name'] := 'username';
Params.Values['Password'] := '*****';
Params.Values['BlobSize'] := '-1';
Params.Values['LocaleCode'] := '0000';
Params.Values['Oracle TransIsolation'] := 'ReadCommited';
Params.Values['RoleName'] := 'Normal';
Params.Values['LongStrings'] := 'True';
Params.Values['EnableBCD'] := 'False';
Params.Values['FetchAll'] := 'False';
Params.Values['UseUnicode'] := 'False';
Params.Values['BCDPrecision'] := '0';
Params.Values['FloatPrecision'] := '38';
Params.Values['IntegerPrecision'] := '38';
end;

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Data Maping Expecting: Integer, Actual: Float

Post by MaximG » Mon 26 Dec 2016 15:13

We checked Devart dbExpress Driver for Oracle operability when using the sent parameters and did not find any problems. Try to clear the Fields list of the ClientDataSet component before executing your query.

LeoPrates
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Re: Data Maping Expecting: Integer, Actual: Float

Post by LeoPrates » Mon 26 Dec 2016 17:07

Thanks for the feedback.

Saying that in your tests everything is ok did not solve my problem, I also need to keep the field as TIntegerField, I can not change it.

Any other suggestions for me to test?

LeoPrates
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Re: Data Maping Expecting: Integer, Actual: Float

Post by LeoPrates » Tue 27 Dec 2016 15:47

Working with two oracle installations.

When I import the columns to the ClientDataset in an Oracle installation the column is being created as TFMTBCDField of Precision 32, and in another installation it is important as TFMTBCDField of 5, but in both databases the column is Number (5).
What is the criteria for columns of the same type to be different in clientdataset?
You looked at the dba_tab_columns, user_tab_columns, and all_tab_columns managements tables of the two databases and found no difference between them.

Any ideas on that?

LeoPrates
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Re: Data Maping Expecting: Integer, Actual: Float

Post by LeoPrates » Tue 27 Dec 2016 17:31

I found the problem ...

Running the select * from v$version command saw that the error is in installations of version 11.2.0.1.0.

In version 11.2.0.4.0 it seems to be right to treat the Number (5) columns as TSmallIntField.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Data Maping Expecting: Integer, Actual: Float

Post by MaximG » Fri 30 Dec 2016 14:49

We are glad that you could detect the problem. In our test environment we tested dbExpress driver for Oracle functionality using the version 11.2.0.1.0.

Post Reply