Errors convertint types after updating to 7.7

Errors convertint types after updating to 7.7

Postby malea » Mon 01 Jul 2013 08:31

Hello,

I have installed dotConnect for Oracle Professional (7.7.257).

Till now, I was using version 5.70 in my project without problems.

After updating to 7.7 version, when I launch my application I obtain two critial errors.

The first one:
Code: Select all
var query = from a in Context.MYTABLE
            where a.FIELD1 == "A"
            select new
            {
                Sel = false,
                NewProperty1 = (int)a.USCAJA_0,
            };

With this code I obtain a System.InvalidOperationException: "Can not compile conversion from 'System.Decimal' to 'System.Int32'".
USCAJA_0 is a Decimal.

And the second one is similar:
Code: Select all
IQueryable<MyType> arts = context.MYTABLE2
                    .GroupBy(c => new { c.DESART_0, c.ARTICULO_0 })
                    .OrderBy(c => c.Key.DESART_0)
                    .Select(c => new MyType
                    {
                        Code = c.Key.ARTICULO_0,
                        Desc = c.Key.DESART_0,
                        Quantity = (decimal) c.Sum(d => d.CAJDISTEC_0),
                        MinFecha = c.Min(d => d.FECHAMIN_0)
                    });

With this code I obtain a System.InvalidOperationException too: "Can not compile conversion from 'System.Int32' to 'System.Decimal'".
CAJDISTEC_0 is an Int32 and Quantity is a Decimal property.


This code was working perfectly with version 5.70.
If I replace (int) and (decimal) by Convert.ToInt32() and Convert.ToDecimal, all works perfect again.
But I have a lot of casts in my app and in other places this code works perfect. So I don't know what is the problem or if it is a bug, and where should I replace (int) and (decimal).

The exception gives me this stacktrace:
Code: Select all
at Devart.Data.Linq.Engine.bh.b(Type A_0, Type A_1, Boolean A_2)
   at Devart.Data.Linq.Engine.bh.a(u A_0, LocalBuilder A_1)
   at Devart.Data.Linq.Engine.bh.b(bi A_0)
   at Devart.Data.Linq.Engine.bh.e(bi A_0)
   at Devart.Data.Linq.Engine.bh.a(SqlExpression A_0, Boolean A_1)
   at Devart.Data.Linq.Engine.z.a(cj A_0, SqlExpression A_1)
   at Devart.Data.Linq.Engine.dr.a(f A_0)
   at Devart.Data.Linq.Engine.dr.f(Expression A_0)
   at Devart.Data.Linq.Engine.DataQuery`1.h()
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Tue 02 Jul 2013 05:28

We couldn't reproduce this issue with the latest dotConnect for Oracle 7.7.267 (as well as with 7.7.257). We are sending you a sample project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter.
Please make changes to it so that the issue could be reproduced and send it back to us or send us your project.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Tue 02 Jul 2013 17:25

MariiaI wrote:We couldn't reproduce this issue with the latest dotConnect for Oracle 7.7.267 (as well as with 7.7.257). We are sending you a sample project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter.
Please make changes to it so that the issue could be reproduced and send it back to us or send us your project.


Hello,

I have sent a mail to you with my project, because I cannot reproduce the errors with your sample project.

I hope you can help me.
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Wed 03 Jul 2013 09:53

Thank you for the sample project. Your application uses components, which require licensing. We have created a simplified version of this sample and the issue is not reproducible with it.
We are sending you this sample project and the SQL scripts for creating database tables. Please check that our SQL scripts are similar to yours, and if they are different please send us the corrected version.
Please try reproducing the issue with the modified sample project.

Also, please make sure that the assemblies with correct versions are loaded to your application, e.g. that the Modules window (Debug->Windows->Modules) displays the following versions when debugging your project:
- Devart.Data - 5.0.716;
- Devart.Data.Oracle - 7.7.257;
- Devart.Data.Linq and Devart.Data.Oracle.Linq - 4.2.262.

Looking forward to your reply.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Wed 03 Jul 2013 11:12

MariiaI wrote:Thank you for the sample project. Your application uses components, which require licensing. We have created a simplified version of this sample and the issue is not reproducible with it.
We are sending you this sample project and the SQL scripts for creating database tables. Please check that our SQL scripts are similar to yours, and if they are different please send us the corrected version.
Please try reproducing the issue with the modified sample project.

Also, please make sure that the assemblies with correct versions are loaded to your application, e.g. that the Modules window (Debug->Windows->Modules) displays the following versions when debugging your project:
- Devart.Data - 5.0.716;
- Devart.Data.Oracle - 7.7.257;
- Devart.Data.Linq and Devart.Data.Oracle.Linq - 4.2.262.

Looking forward to your reply.

I have sent you my SQL scripts by email.
The assemblies loaded are correct.
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Fri 05 Jul 2013 11:53

Thank you for the additional information. We are investigating this behaviour. We will inform you about the results as soon as any are available.
Please tell us whether you have managed to reproduce the issue with a sample project, which we have sent you on 03.07.2013 12:53.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Tue 09 Jul 2013 06:22

MariiaI wrote:Thank you for the additional information. We are investigating this behaviour. We will inform you about the results as soon as any are available.
Please tell us whether you have managed to reproduce the issue with a sample project, which we have sent you on 03.07.2013 12:53.


I have used your scripts to create new tables, and with your sample project I can not reproduce the issue...

With my code, I obtain this stacktrace:

Code: Select all
at Devart.Data.Linq.Engine.bh.b(Type A_0, Type A_1, Boolean A_2)
   at Devart.Data.Linq.Engine.bh.b(bi A_0)
   at Devart.Data.Linq.Engine.bh.e(bi A_0)
   at Devart.Data.Linq.Engine.bh.a(SqlExpression A_0, Boolean A_1)
   at Devart.Data.Linq.Engine.z.a(cj A_0, SqlExpression A_1)
   at Devart.Data.Linq.Engine.dr.a(f A_0)
   at Devart.Data.Linq.Engine.dr.f(Expression A_0)
   at Devart.Data.Linq.Engine.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Linq.SystemCore_EnumerableDebugView`1.get_Items()
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Tue 09 Jul 2013 09:02

We have managed to reproduce the issue related to the "Can not compile conversion from 'System.Int32' to 'System.Decimal' exception. We will investigate it and infrom you about the results as soon as any are available.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Tue 09 Jul 2013 09:21

MariiaI wrote:We have managed to reproduce the issue related to the "Can not compile conversion from 'System.Int32' to 'System.Decimal' exception. We will investigate it and infrom you about the results as soon as any are available.

Thank you.

I have sent a mail with some more info.

I hope it can help you.
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Wed 10 Jul 2013 09:48

Thank you for the additional information. We are working on this issue and we will inform you about the results as soon as any are available.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Tue 16 Jul 2013 07:01

The bug with materialization when converting decimal values has been fixed. The fix will be included in the next build of dotConnect for Oracle. We will inform you when it is available for download.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Tue 16 Jul 2013 07:13

MariiaI wrote:The bug with materialization when converting decimal values has been fixed. The fix will be included in the next build of dotConnect for Oracle. We will inform you when it is available for download.

Thank you for the info.

The error was taking place converting an int to decimal, but also converting a decimal to int. I suppose that you have taken it in mind.

Thank you again.
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Wed 17 Jul 2013 09:19

The bug with materialization when converting decimal values has been fixed for all cases (support is added for converting Decimal to/from Byte, SByte, Int16, Int32, Int64, Single, Double, etc).
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Errors convertint types after updating to 7.7

Postby malea » Wed 17 Jul 2013 09:22

Thank you for the info.
malea
 
Posts: 33
Joined: Fri 25 Jan 2013 08:25

Re: Errors convertint types after updating to 7.7

Postby MariiaI » Fri 19 Jul 2013 06:42

New version of dotConnect for Oracle 7.8 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=27556.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Next

Return to dotConnect for Oracle