Search found 3 matches

by samas
Mon 22 Nov 2010 08:46
Forum: dotConnect for Oracle
Topic: Migration from MS ADO to DevArt DataProvider
Replies: 4
Views: 1556

Never mind. I found the error. The class name is not OracleNumberMapping but just NumberMapping. Using this one works perfectly.

Thanks for the hint.

So the example is :

Code: Select all

OracleConnection con = new OracleConnection(ConnectionString);
con.Open();
con.NumberMappings.Add(new NumberMapping(OracleNumberType.Integer, 15, typeof(System.Decimal))); 
by samas
Mon 22 Nov 2010 08:29
Forum: dotConnect for Oracle
Topic: Migration from MS ADO to DevArt DataProvider
Replies: 4
Views: 1556

I dont have that OracleNumberMapping class in the installed devart assembly. I used the dcoracle570pro.exe package to install. The assembly version of Devart.Data.Oracle.dll is 5.70.170.0. The NumberMappings property exists but the Add() method needs one object as parameter.

The example at the devart documentation doesnt work either. There is only the Add() method with one parameter (of object)

oracleConnection.NumberMappings.Add(OracleNumberType.Integer, 10, 18, typeof(Int64));

Any idea whats wrong?
by samas
Fri 19 Nov 2010 09:40
Forum: dotConnect for Oracle
Topic: Migration from MS ADO to DevArt DataProvider
Replies: 4
Views: 1556

Migration from MS ADO to DevArt DataProvider

Hi there,
we switched to .Net Framework 4.0 and since Microsoft will no longer support their ADO .NET Client for Oracle we are about to change to devart. I did some tests and had the following problem:

In our code there are statements like

OracleDataReader reader;
....
decimal? val = reader["field"] as decimal?

The field is defined as NUMBER(15) in oracle. The MS version works perfektly and the correct value is assigned to the val variable. When using the same code with the devart provider the assigned value is NULL because reader["field"] is a double. When using reader.GetDecimal(i) on that field I get the correct result.

Is there a known solution to use the given code above?

Regards

Samas