Page 1 of 1

ADO.NET NumberMappings

Posted: Sat 26 Mar 2016 13:33
by agent5566
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/oracl ... pings.html.

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

Re: ADO.NET NumberMappings

Posted: Mon 28 Mar 2016 10:01
by Pinturiccio
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.

Re: ADO.NET NumberMappings

Posted: Mon 28 Mar 2016 11:02
by agent5566
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.

Re: ADO.NET NumberMappings

Posted: Mon 28 Mar 2016 13:39
by Pinturiccio
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Re: ADO.NET NumberMappings

Posted: Wed 04 May 2016 10:49
by Pinturiccio
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.

Re: ADO.NET NumberMappings

Posted: Fri 06 May 2016 08:40
by Pinturiccio
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

Re: ADO.NET NumberMappings

Posted: Fri 06 May 2016 09:58
by agent5566
thanks a lot