Errors in obtaining data by dotConect for Oracle 9.13

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dqrest
Posts: 32
Joined: Tue 15 Sep 2015 06:01

Errors in obtaining data by dotConect for Oracle 9.13

Post by dqrest » Wed 30 Sep 2020 09:01

Hello!

I have the following tools in my computer:
1) Oracle Client 12.2.0 x64
2) dotConect for Oracle 9.13 (trial version)
3) MS VS 2019

Now I create a concole application for .NetFramework 4.7.2 in MS VS 2019.
Than I compile this application as x64 with the following code.

Code: Select all

[Table(Name = "OBJ$GROUPS")]
    public class Group
    {
        long _No;
        [Column(Name = "NO", Storage = "_No", IsPrimaryKey = true)]
        public long No { get { return _No; } }
    }

Code: Select all

public class Result
    {
        public long No { get; set; }
        public long? TypeNo { get; set; }

    }

Code: Select all

[ProviderAttribute(typeof(Devart.Data.Oracle.Linq.Provider.OracleDataProvider))]
    public class TypeTreeDataContext : DataContext
    {
        public TypeTreeDataContext(OracleConnection conn) : base(conn) { ObjectTrackingEnabled = false; }

        public Table<Group> Group => GetTable<Group>();

    }

Code: Select all

static void Main(string[] args)
{
     OracleConnection conn = new OracleConnection("Pooling=false") { UserId = Login, Password = Password, Server = 					 
                                                                                                                       Server, Direct = false };
     conn.Open();
     
      var data = new TypeTreeDataContext(conn);

            var res= data.Group
                .Where(g => g.No >= 1000000 && g.No <= 1050000)
                .Select(g => new Result{
                    No = g.No,
                    TypeNo = 10                     
                })
                .ToList();
 }
After launching the application I have an error in the row of executing the query.
The error have the following message:
"Конструктор для типа "System.Runtime.CompilerServices.StrongBox`1[[System.Nullable`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" не найден"

What happend? This problem is not appeared in dotConnect 6.60.258 (but for x86).
Note that the problem is solved after removing TypeNo in the result and the application should be compiled by x64.

dqrest
Posts: 32
Joined: Tue 15 Sep 2015 06:01

Re: Errors in obtaining data by dotConect for Oracle 9.13

Post by dqrest » Thu 01 Oct 2020 04:59

Is there any solution of this problem?

dqrest
Posts: 32
Joined: Tue 15 Sep 2015 06:01

Re: Errors in obtaining data by dotConect for Oracle 9.13

Post by dqrest » Thu 01 Oct 2020 08:50

After making some experiments I have found the following ugly solution
var res= data.Group
.Where(g => g.No >= 1000000 && g.No <= 1050000)
.Select(g => new Result{
No = g.No,
TypeNo = new long?(10)
})
.ToList()

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Errors in obtaining data by dotConect for Oracle 9.13

Post by Shalex » Mon 05 Oct 2020 16:20

Thank you for your report. We will investigate the issue and notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Errors in obtaining data by dotConect for Oracle 9.13

Post by Shalex » Fri 30 Oct 2020 11:12

The bug with using nullable numeric types within subqueries is fixed: viewtopic.php?f=31&t=42366.

Post Reply