Data Maping Expecting: Integer, Actual: Float

Data Maping Expecting: Integer, Actual: Float

Postby 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;
LeoPrates
 
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Re: Data Maping Expecting: Integer, Actual: Float

Postby 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.
MaximG
Devart Team
 
Posts: 848
Joined: Mon 06 Jul 2015 11:34

Re: Data Maping Expecting: Integer, Actual: Float

Postby 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

Postby 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

Postby 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.
LeoPrates
 
Posts: 8
Joined: Fri 23 Dec 2016 10:35

Re: Data Maping Expecting: Integer, Actual: Float

Postby 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.
MaximG
Devart Team
 
Posts: 848
Joined: Mon 06 Jul 2015 11:34


Return to dbExpress driver for Oracle