ADO.NET NumberMappings

ADO.NET NumberMappings

Postby agent5566 » Sat 26 Mar 2016 13:33

Hello! I have an issue with number mapping in ADO.NET. I'd like to map all number values to decimal in .net so I added a map line:
Code: Select all
Connection.NumberMappings.Add(OracleNumberType.Number, 1, 38, typeof(decimal));


But then i got default data mappings for my query (there were int32, int64, double and others)
dataReader.GetSchemaTable()


I haven't seen any clarification in the doc https://www.devart.com/dotconnect/oracle/docs/Devart.Data.Oracle~Devart.Data.Oracle.OracleConnection~NumberMappings.html.

Is it possible to map number types in ADO.NET ?
agent5566
 
Posts: 3
Joined: Sat 26 Mar 2016 13:20

Re: ADO.NET NumberMappings

Postby Pinturiccio » Mon 28 Mar 2016 10:01

agent5566 wrote:Is it possible to map number types in ADO.NET ?

The code you use should work correctly and map the number type with any precision and scale to System.Decimal type.

We could not reproduce the issue. In the latest version of dotConnect for Oracle we get DataType decimal using your code for Number types with different precision and scale values.

Please tell us the following information:
1. dotConnect for Oracle version;
2. Oracle server version;
3. If you use the OCI connection mode, tell us the version of Oracle Client.

If possible, create and send us a small test project with the corresponding DDL/DML script for reproducing the issue.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: ADO.NET NumberMappings

Postby agent5566 » Mon 28 Mar 2016 11:02

Hi guys!
1. dotConnect for Oracle version: 8.5.583.0
2. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
3. I use OCI connection mode, the client version is: 11.1.0.7.0

I made a test project: https://yadi.sk/d/lYM70d-wqXrfk?ncrnd=5170
PS I sent the issue to support.
agent5566
 
Posts: 3
Joined: Sat 26 Mar 2016 13:20

Re: ADO.NET NumberMappings

Postby Pinturiccio » Mon 28 Mar 2016 13:39

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: ADO.NET NumberMappings

Postby Pinturiccio » Wed 04 May 2016 10:49

We have fixed the bug with NumberMappings for OracleDataReader that is retrieved from a REF CURSOR. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: ADO.NET NumberMappings

Postby Pinturiccio » Fri 06 May 2016 08:40

New build of dotConnect for Oracle 9.0.12 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=33635
Pinturiccio
Devart Team
 
Posts: 1928
Joined: Wed 02 Nov 2011 09:44

Re: ADO.NET NumberMappings

Postby agent5566 » Fri 06 May 2016 09:58

thanks a lot
agent5566
 
Posts: 3
Joined: Sat 26 Mar 2016 13:20


Return to dotConnect for Oracle